mkstack/src/App.tsx

44 lines
1.4 KiB
TypeScript
Raw Normal View History

// NOTE: This file should normally not be modified unless you are adding a new provider.
// To add new routes, edit the AppRouter.tsx file.
import NostrProvider from '@/components/NostrProvider'
2025-04-16 21:43:54 -05:00
import { Toaster } from "@/components/ui/toaster";
import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { NostrLoginProvider } from '@nostrify/react/login';
2025-04-17 16:53:23 -05:00
import AppRouter from './AppRouter';
2025-05-16 18:30:25 -05:00
// DO NOT MODIFY THIS LIST UNLESS YOU ARE ABSOLUTELY CERTAIN EACH RELAY URL YOU ARE ADDING IS VALID AND THE RELAY IS CURRENTLY ONLINE AND CONFIRMED TO BE FULLY FUNCTIONAL AND WORKING.
const defaultRelays = [
2025-05-16 18:30:25 -05:00
'wss://relay.nostr.band', // DO NOT MODIFY THIS UNLESS EXPLICITLY REQUESTED
];
2025-04-16 21:43:54 -05:00
2025-04-18 12:05:24 -05:00
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
staleTime: 60000, // 1 minute
gcTime: Infinity,
},
},
});
2025-04-16 21:43:54 -05:00
2025-04-17 16:53:23 -05:00
export function App() {
return (
<NostrLoginProvider storageKey='nostr:login'>
<NostrProvider relays={defaultRelays}>
<QueryClientProvider client={queryClient}>
<TooltipProvider>
<Toaster />
<Sonner />
<AppRouter />
</TooltipProvider>
</QueryClientProvider>
</NostrProvider>
</NostrLoginProvider>
);
}
2025-04-16 21:43:54 -05:00
export default App;