Refactor AppProvider, AppConfig and presetRelays

This commit is contained in:
Alex Gleason committed 2025-06-04 10:20:31 -05:00
1 parent 3ad83cd114
commit 048bf4cc69
8 files changed
+46 -26

No files matched your search

+5 -1
View File
@@ -8,13 +8,16 @@ interface AppProviderProps {
storageKey: string;
/** Default app configuration */
defaultConfig: AppConfig;
/** Optional list of preset relays to display in the RelaySelector */
presetRelays?: { name: string; url: string }[];
}
export function AppProvider(props: AppProviderProps) {
const {
children,
storageKey,
defaultConfig
defaultConfig,
presetRelays,
} = props;
// App configuration state with localStorage persistence
@@ -28,6 +31,7 @@ export function AppProvider(props: AppProviderProps) {
const appContextValue: AppContextType = {
config,
updateConfig,
presetRelays,
};
// Apply theme effects to document