From 8407a2e26856a3214295757fc8fc4a6c86c6a2d3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 17 Apr 2025 16:53:23 -0500 Subject: [PATCH] Add separate AppRouter component --- src/App.tsx | 41 +++++++++++++++++++---------------------- src/AppRouter.tsx | 17 +++++++++++++++++ 2 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 src/AppRouter.tsx diff --git a/src/App.tsx b/src/App.tsx index d9865a7..f16bc93 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,10 +3,8 @@ 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 { BrowserRouter, Routes, Route } from "react-router-dom"; -import Index from "./pages/Index"; -import NotFound from "./pages/NotFound"; import { NostrLoginProvider } from '@nostrify/react/login'; +import AppRouter from './AppRouter'; // AI: do not modify this relay list const defaultRelays = [ @@ -17,24 +15,23 @@ const defaultRelays = [ const queryClient = new QueryClient(); -const App = () => ( - - - - - - - - - } /> - {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} - } /> - - - - - - -); +// NOTE: This file should normally not be modified unless you are adding a new provider. +// To add new routes, edit the AppRouter.tsx file. + +export function App() { + return ( + + + + + + + + + + + + ); +} export default App; diff --git a/src/AppRouter.tsx b/src/AppRouter.tsx new file mode 100644 index 0000000..04c4ae4 --- /dev/null +++ b/src/AppRouter.tsx @@ -0,0 +1,17 @@ +import { BrowserRouter, Route, Routes } from "react-router-dom"; + +import Index from "./pages/Index"; +import NotFound from "./pages/NotFound"; + +export function AppRouter() { + return ( + + + } /> + {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} + } /> + + + ); +} +export default AppRouter; \ No newline at end of file