diff --git a/packages/webapp/src/routeTree.gen.ts b/packages/webapp/src/routeTree.gen.ts index d204c26..a1e50d1 100644 --- a/packages/webapp/src/routeTree.gen.ts +++ b/packages/webapp/src/routeTree.gen.ts @@ -9,50 +9,118 @@ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. import { Route as rootRouteImport } from './routes/__root' -import { Route as IndexRouteImport } from './routes/index' +import { Route as GarrysmodRouteImport } from './routes/garrysmod' +import { Route as MainRouteImport } from './routes/_main' +import { Route as GarrysmodIndexRouteImport } from './routes/garrysmod.index' +import { Route as MainIndexRouteImport } from './routes/_main.index' -const IndexRoute = IndexRouteImport.update({ +const GarrysmodRoute = GarrysmodRouteImport.update({ + id: '/garrysmod', + path: '/garrysmod', + getParentRoute: () => rootRouteImport, +} as any) +const MainRoute = MainRouteImport.update({ + id: '/_main', + getParentRoute: () => rootRouteImport, +} as any) +const GarrysmodIndexRoute = GarrysmodIndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => rootRouteImport, + getParentRoute: () => GarrysmodRoute, +} as any) +const MainIndexRoute = MainIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => MainRoute, } as any) export interface FileRoutesByFullPath { - '/': typeof IndexRoute + '/garrysmod': typeof GarrysmodRouteWithChildren + '/': typeof MainIndexRoute + '/garrysmod/': typeof GarrysmodIndexRoute } export interface FileRoutesByTo { - '/': typeof IndexRoute + '/': typeof MainIndexRoute + '/garrysmod': typeof GarrysmodIndexRoute } export interface FileRoutesById { __root__: typeof rootRouteImport - '/': typeof IndexRoute + '/_main': typeof MainRouteWithChildren + '/garrysmod': typeof GarrysmodRouteWithChildren + '/_main/': typeof MainIndexRoute + '/garrysmod/': typeof GarrysmodIndexRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' + fullPaths: '/garrysmod' | '/' | '/garrysmod/' fileRoutesByTo: FileRoutesByTo - to: '/' - id: '__root__' | '/' + to: '/' | '/garrysmod' + id: '__root__' | '/_main' | '/garrysmod' | '/_main/' | '/garrysmod/' fileRoutesById: FileRoutesById } export interface RootRouteChildren { - IndexRoute: typeof IndexRoute + MainRoute: typeof MainRouteWithChildren + GarrysmodRoute: typeof GarrysmodRouteWithChildren } declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' + '/garrysmod': { + id: '/garrysmod' + path: '/garrysmod' + fullPath: '/garrysmod' + preLoaderRoute: typeof GarrysmodRouteImport + parentRoute: typeof rootRouteImport + } + '/_main': { + id: '/_main' + path: '' + fullPath: '' + preLoaderRoute: typeof MainRouteImport + parentRoute: typeof rootRouteImport + } + '/garrysmod/': { + id: '/garrysmod/' + path: '/' + fullPath: '/garrysmod/' + preLoaderRoute: typeof GarrysmodIndexRouteImport + parentRoute: typeof GarrysmodRoute + } + '/_main/': { + id: '/_main/' path: '/' fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport + preLoaderRoute: typeof MainIndexRouteImport + parentRoute: typeof MainRoute } } } +interface MainRouteChildren { + MainIndexRoute: typeof MainIndexRoute +} + +const MainRouteChildren: MainRouteChildren = { + MainIndexRoute: MainIndexRoute, +} + +const MainRouteWithChildren = MainRoute._addFileChildren(MainRouteChildren) + +interface GarrysmodRouteChildren { + GarrysmodIndexRoute: typeof GarrysmodIndexRoute +} + +const GarrysmodRouteChildren: GarrysmodRouteChildren = { + GarrysmodIndexRoute: GarrysmodIndexRoute, +} + +const GarrysmodRouteWithChildren = GarrysmodRoute._addFileChildren( + GarrysmodRouteChildren, +) + const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, + MainRoute: MainRouteWithChildren, + GarrysmodRoute: GarrysmodRouteWithChildren, } export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) diff --git a/packages/webapp/src/routes/__root.tsx b/packages/webapp/src/routes/__root.tsx index 90482ae..543ac66 100644 --- a/packages/webapp/src/routes/__root.tsx +++ b/packages/webapp/src/routes/__root.tsx @@ -1,12 +1,5 @@ import { createRootRoute, Outlet } from "@tanstack/react-router" import { TanStackRouterDevtools } from "@tanstack/react-router-devtools" -import { useTranslation } from "react-i18next" -import { DiGit } from "react-icons/di" -import { FaCode } from "react-icons/fa" -import root from "react-shadow" -import { Button } from "@/components/ui/button" -import { Card, CardContent } from "@/components/ui/card" -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" export const Route = createRootRoute({ @@ -14,86 +7,8 @@ export const Route = createRootRoute({ }) function RootComponent() { - const { t, i18n } = useTranslation() - return <> -
- - - -
- -
-
- - - -
-
-
Julien Valverde
-
-
-

There's so much room for activities!

-
-
-
- -
-

Ingénieur Full Stack • Entrepreneur

- -

- I am passionate about integrating functionality and design in applications to create intuitive, user-friendly experiences. -

- -
- - - - - - -

{t($ => $.gitRepos.tooltip, { ns: "nav" })}

-
-
- - - - - - - -

{t($ => $.sourceCode.tooltip, { ns: "nav" })}

-
-
- - -
-
-
-
- -
- - - - - -
- + } diff --git a/packages/webapp/src/routes/index.tsx b/packages/webapp/src/routes/_main.index.tsx similarity index 78% rename from packages/webapp/src/routes/index.tsx rename to packages/webapp/src/routes/_main.index.tsx index 1c2683e..64ef574 100644 --- a/packages/webapp/src/routes/index.tsx +++ b/packages/webapp/src/routes/_main.index.tsx @@ -1,7 +1,7 @@ import { createFileRoute } from "@tanstack/react-router" -export const Route = createFileRoute("/")({ +export const Route = createFileRoute("/_main/")({ component: RouteComponent, }) diff --git a/packages/webapp/src/routes/_main.tsx b/packages/webapp/src/routes/_main.tsx new file mode 100644 index 0000000..c921609 --- /dev/null +++ b/packages/webapp/src/routes/_main.tsx @@ -0,0 +1,96 @@ +import { createFileRoute, Outlet } from "@tanstack/react-router" +import { useTranslation } from "react-i18next" +import { DiGit } from "react-icons/di" +import { FaCode } from "react-icons/fa" +import root from "react-shadow" +import { Button } from "@/components/ui/button" +import { Card, CardContent } from "@/components/ui/card" +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" + + +export const Route = createFileRoute("/_main")({ + component: SharedLayout, +}) + +function SharedLayout() { + const { t, i18n } = useTranslation() + + return <> +
+ + + +
+ +
+
+ + + +
+
+
Julien Valverde
+
+
+

There's so much room for activities!

+
+
+
+ +
+

Ingénieur Full Stack • Entrepreneur

+ +

+ I am passionate about integrating functionality and design in applications to create intuitive, user-friendly experiences. +

+ +
+ + + + + + +

{t($ => $.gitRepos.tooltip, { ns: "nav" })}

+
+
+ + + + + + + +

{t($ => $.sourceCode.tooltip, { ns: "nav" })}

+
+
+ + +
+
+
+
+ +
+ + + + + +
+ +} diff --git a/packages/webapp/src/routes/garrysmod.index.tsx b/packages/webapp/src/routes/garrysmod.index.tsx new file mode 100644 index 0000000..3e51de5 --- /dev/null +++ b/packages/webapp/src/routes/garrysmod.index.tsx @@ -0,0 +1,10 @@ +import { createFileRoute } from "@tanstack/react-router" + + +export const Route = createFileRoute("/garrysmod/")({ + component: RouteComponent, +}) + +function RouteComponent() { + return null +} diff --git a/packages/webapp/src/routes/garrysmod.tsx b/packages/webapp/src/routes/garrysmod.tsx new file mode 100644 index 0000000..c444248 --- /dev/null +++ b/packages/webapp/src/routes/garrysmod.tsx @@ -0,0 +1,10 @@ +import { createFileRoute, Outlet } from "@tanstack/react-router" + + +export const Route = createFileRoute("/garrysmod")({ + component: GarrysmodLayout, +}) + +function GarrysmodLayout() { + return +}