Initial commit

This commit is contained in:
Bohdan Denysenko 2024-12-29 10:56:43 +00:00 • committed by GitHub
commit 864f37a652
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 45596 additions and 0 deletions

View file

@ -0,0 +1,33 @@
import { Button, HStack, Stack } from "@chakra-ui/react";
import { createRootRoute, Link, Outlet } from "@tanstack/react-router";
import React from "react";
const TanStackRouterDevtools =
process.env.NODE_ENV === "production"
? () => null // Render nothing in production
: React.lazy(() =>
// Lazy load in development
import("@tanstack/router-devtools").then((res) => ({
default: res.TanStackRouterDevtools,
// For Embedded Mode
// default: res.TanStackRouterDevtoolsPanel
})),
);
export const Route = createRootRoute({
component: () => (
<Stack padding={3}>
<HStack>
<Link to="/">
<Button>Home</Button>
</Link>
<Link to="/about">
<Button>About</Button>
</Link>
</HStack>
<hr style={{ padding: "4px" }} />
<Outlet />
<TanStackRouterDevtools />
</Stack>
),
});