diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 113022f4..acb33816 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -59,6 +59,7 @@ "react-markdown": "^9.0.1", "react-masonry-css": "^1.0.16", "react-router-dom": "6.25.1", + "react-router-typesafe-routes": "^1.2.2", "react-use-websocket": "^4.8.1", "remark-gfm": "^4.0.0", "tailwind-merge": "^2.5.2", @@ -10001,6 +10002,36 @@ "react-dom": ">=16.8" } }, + "node_modules/react-router-typesafe-routes": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/react-router-typesafe-routes/-/react-router-typesafe-routes-1.2.2.tgz", + "integrity": "sha512-aUTUO0XzEhevQTNACv82SJVRbUMnGCrQIecRwKWLRNt2oKXs01kW4nIJbRV8xwAvv9PR4WKM2Iifd84DiOr73w==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": ">=16.8", + "react-router-dom": "^6.7.0", + "react-router-native": "^6.7.0", + "yup": "^1.0.0", + "zod": "^3.0.0" + }, + "peerDependenciesMeta": { + "react-router-dom": { + "optional": true + }, + "react-router-native": { + "optional": true + }, + "yup": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, "node_modules/react-side-effect": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index 35aa2bb7..17849b3b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -74,6 +74,7 @@ "react-markdown": "^9.0.1", "react-masonry-css": "^1.0.16", "react-router-dom": "6.25.1", + "react-router-typesafe-routes": "^1.2.2", "react-use-websocket": "^4.8.1", "remark-gfm": "^4.0.0", "tailwind-merge": "^2.5.2", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5807698b..040e3452 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -8,6 +8,7 @@ import PendoInitializer from "@/components/PendoInitializer"; import { ScrollToTop } from "@/components/ScrollToTop"; import SprigInitializer from "@/components/SprigInitializer"; import Footer from "@/components/footer/Footer"; +import GDPRBanner from "@/components/gdpr/gdprbanner"; import { FeaturedListingsProvider } from "@/components/listing/FeaturedListings"; import Navbar from "@/components/nav/Navbar"; import APIKeys from "@/components/pages/APIKeys"; @@ -15,6 +16,8 @@ import About from "@/components/pages/About"; import Account from "@/components/pages/Account"; import Browse from "@/components/pages/Browse"; import Create from "@/components/pages/Create"; +import DeleteConnect from "@/components/pages/DeleteConnect"; +import DownloadsPage from "@/components/pages/Download"; import EmailSignup from "@/components/pages/EmailSignup"; import FileBrowser from "@/components/pages/FileBrowser"; import Home from "@/components/pages/Home"; @@ -22,23 +25,20 @@ import Listing from "@/components/pages/Listing"; import Login from "@/components/pages/Login"; import Logout from "@/components/pages/Logout"; import NotFound from "@/components/pages/NotFound"; +import OrderSuccess from "@/components/pages/OrderSuccess"; +import OrdersPage from "@/components/pages/Orders"; +import Playground from "@/components/pages/Playground"; +import PrivacyPolicy from "@/components/pages/PrivacyPolicy"; import Profile from "@/components/pages/Profile"; +import ResearchPage from "@/components/pages/ResearchPage"; import SellerDashboard from "@/components/pages/SellerDashboard"; +import SellerOnboarding from "@/components/pages/SellerOnboarding"; import Signup from "@/components/pages/Signup"; +import Terminal from "@/components/pages/Terminal"; +import TermsOfService from "@/components/pages/TermsOfService"; import { AlertQueue, AlertQueueProvider } from "@/hooks/useAlertQueue"; import { AuthenticationProvider } from "@/hooks/useAuth"; - -import GDPRBanner from "./components/gdpr/gdprbanner"; -import DeleteConnect from "./components/pages/DeleteConnect"; -import DownloadsPage from "./components/pages/Download"; -import OrderSuccess from "./components/pages/OrderSuccess"; -import OrdersPage from "./components/pages/Orders"; -import Playground from "./components/pages/Playground"; -import PrivacyPolicy from "./components/pages/PrivacyPolicy"; -import ResearchPage from "./components/pages/ResearchPage"; -import SellerOnboarding from "./components/pages/SellerOnboarding"; -import Terminal from "./components/pages/Terminal"; -import TermsOfService from "./components/pages/TermsOfService"; +import ROUTES from "@/lib/types/routes"; const App = () => { return ( @@ -56,55 +56,113 @@ const App = () => {