v2
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
'use client';
|
||||
|
||||
import { createContext, useContext } from 'react';
|
||||
|
||||
export interface AppSettings {
|
||||
siteName: string;
|
||||
selectedLeague: string;
|
||||
primaryColor: string;
|
||||
secondaryColor: string;
|
||||
showLiveMatches: boolean;
|
||||
showStandings: boolean;
|
||||
showTopScorers: boolean;
|
||||
showRecentResults: boolean;
|
||||
showUpcoming: boolean;
|
||||
refreshInterval: number;
|
||||
}
|
||||
|
||||
export const defaultSettings: AppSettings = {
|
||||
siteName: 'Primeira Liga Stats',
|
||||
selectedLeague: 'primeira_liga',
|
||||
primaryColor: '#E42518',
|
||||
secondaryColor: '#006600',
|
||||
showLiveMatches: true,
|
||||
showStandings: true,
|
||||
showTopScorers: true,
|
||||
showRecentResults: true,
|
||||
showUpcoming: true,
|
||||
refreshInterval: 300,
|
||||
};
|
||||
|
||||
export const SettingsContext = createContext<AppSettings>(defaultSettings);
|
||||
|
||||
export function useSettings() {
|
||||
return useContext(SettingsContext);
|
||||
}
|
||||
Reference in New Issue
Block a user