```diff diff --git a/src/pages/Dummy.tsx b/src/pages/Dummy.tsx new file mode 100644 index 0000000..d691ed7 --- /dev/null +++ b/src/pages/Dummy.tsx @@ -0,0 +1,9 @@ +import { createLazyRoute } from "@tanstack/react-router"; + +export const Route = createLazyRoute('/Dummy')({ + component: Dummy, +}) + +export function Dummy() { + return null; +} diff --git a/src/routes.tsx b/src/routes.tsx index 5e2f73c..03dfa1e 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -5,6 +5,7 @@ import { Root } from "./components/root"; import { Dashboard } from "./pages/Dashboard"; import { Home } from "./pages/Home"; import { Login } from "./pages/Login"; +import { Dummy } from "./pages/Dummy"; import { PokemonDetail } from "./pages/PokemonDetail"; import { Search } from "./pages/Search"; import { ItemFilters } from "./types/item-filters"; @@ -53,10 +54,16 @@ const searchRoute = createRoute({ component: Search, }); +const dummyRoute = createRoute({ + getParentRoute: () => rootRoute, + path: "/dummy", +}).lazy(() => import('./pages/Dummy.lazy').then((d) => d.Route)); + export const routeTree = rootRoute.addChildren([ indexRoute, dashboardRoute, pokemonDetailRoute, searchRoute, ...skipping... --- /dev/null +++ b/src/pages/Dummy.tsx @@ -0,0 +1,9 @@ +import { createLazyRoute } from "@tanstack/react-router"; + +export const Route = createLazyRoute('/Dummy')({ + component: Dummy, +}) + +export function Dummy() { + return null; +} diff --git a/src/routes.tsx b/src/routes.tsx index 5e2f73c..03dfa1e 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -5,6 +5,7 @@ import { Root } from "./components/root"; import { Dashboard } from "./pages/Dashboard"; import { Home } from "./pages/Home"; import { Login } from "./pages/Login"; +import { Dummy } from "./pages/Dummy"; import { PokemonDetail } from "./pages/PokemonDetail"; import { Search } from "./pages/Search"; import { ItemFilters } from "./types/item-filters"; @@ -53,10 +54,16 @@ const searchRoute = createRoute({ component: Search, }); +const dummyRoute = createRoute({ + getParentRoute: () => rootRoute, + path: "/dummy", +}).lazy(() => import('./pages/Dummy.lazy').then((d) => d.Route)); + export const routeTree = rootRoute.addChildren([ indexRoute, dashboardRoute, pokemonDetailRoute, searchRoute, loginRoute, + dummyRoute, ]); ```