|
1 |
| -import '../style.css'; |
2 |
| -import { RouterProvider, createMemoryRouter } from 'react-router-dom'; |
| 1 | + |
| 2 | +import "../style.css"; |
| 3 | +import { RouterProvider, createMemoryRouter } from "react-router-dom"; |
3 | 4 |
|
4 | 5 | // Import the layouts
|
5 |
| -import { RootLayout } from './layouts/root-layout'; |
| 6 | +import { RootLayout } from "./layouts/root-layout"; |
6 | 7 |
|
7 | 8 | // Import the components
|
8 |
| -import { SignInPage } from './routes/sign-in'; |
9 |
| -import { SignUpPage } from './routes/sign-up'; |
10 |
| -import { Index } from './routes'; |
11 |
| -import { Settings } from './routes/settings'; |
12 |
| -import { SDKFeatures } from './routes/sdk-features'; |
| 9 | +import { SignInPage } from "./routes/sign-in"; |
| 10 | +import { SignUpPage } from "./routes/sign-up"; |
| 11 | +import { Settings } from "./routes/settings"; |
| 12 | +import { SDKFeatures } from "./routes/sdk-features"; |
| 13 | +import { Home } from "./routes/home"; |
13 | 14 |
|
14 | 15 | // Create the router
|
15 | 16 | // This removes the need for an App.tsx file
|
16 | 17 | const router = createMemoryRouter([
|
17 | 18 | {
|
18 | 19 | element: <RootLayout />,
|
19 | 20 | children: [
|
20 |
| - { path: '/', element: <Index /> }, |
21 |
| - { path: '/sign-in', element: <SignInPage /> }, |
22 |
| - { path: '/sign-up', element: <SignUpPage /> }, |
23 |
| - { path: '/settings', element: <Settings /> }, |
24 |
| - { path: '/sdk-features', element: <SDKFeatures /> }, |
| 21 | + { path: "/", element: <Home /> }, |
| 22 | + { path: "/sign-in", element: <SignInPage /> }, |
| 23 | + { path: "/sign-up", element: <SignUpPage /> }, |
| 24 | + { path: "/settings", element: <Settings /> }, |
| 25 | + { path: "/sdk-features", element: <SDKFeatures /> } |
25 | 26 | ],
|
26 | 27 | },
|
27 |
| -]); |
| 28 | +], { |
| 29 | + future: { |
| 30 | + v7_relativeSplatPath: true |
| 31 | + } |
| 32 | +}); |
28 | 33 |
|
29 | 34 | export default function PopupIndex() {
|
30 |
| - return <RouterProvider router={router} />; |
| 35 | + return ( |
| 36 | + <RouterProvider router={router} future={{ v7_startTransition: true }} /> |
| 37 | + ) |
31 | 38 | }
|
0 commit comments