updated codegen, fixed tsconfig, added prisma
added login, registration and session check
This commit is contained in:
parent
9518787206
commit
04b606b7fa
24 changed files with 740 additions and 1747 deletions
|
|
@ -1,28 +1,28 @@
|
|||
import { Button, Stack } from "@chakra-ui/react";
|
||||
import { createRootRoute, Link, Outlet } from "@tanstack/react-router";
|
||||
import React from "react";
|
||||
import { Button, Stack } from '@chakra-ui/react';
|
||||
import { createRootRoute, Link, Outlet } from '@tanstack/react-router';
|
||||
import React from 'react';
|
||||
|
||||
const TanStackRouterDevtools =
|
||||
process.env.NODE_ENV === "production"
|
||||
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,
|
||||
import('@tanstack/router-devtools').then(res => ({
|
||||
default: res.TanStackRouterDevtools
|
||||
// For Embedded Mode
|
||||
// default: res.TanStackRouterDevtoolsPanel
|
||||
})),
|
||||
}))
|
||||
);
|
||||
|
||||
export const Route = createRootRoute({
|
||||
component: () => (
|
||||
<Stack padding={3}>
|
||||
<Stack flexDirection={"row"} justifyContent={"space-between"}>
|
||||
<Stack flexDirection={'row'} justifyContent={'space-between'}>
|
||||
<Link to="/">
|
||||
<Button>Home</Button>
|
||||
</Link>
|
||||
|
||||
<Stack flexDirection={"row"}>
|
||||
<Stack flexDirection={'row'}>
|
||||
<Link to="/login">
|
||||
<Button>Sign in</Button>
|
||||
</Link>
|
||||
|
|
@ -31,9 +31,9 @@ export const Route = createRootRoute({
|
|||
</Link>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<hr style={{ padding: "4px" }} />
|
||||
<hr style={{ padding: '4px' }} />
|
||||
<Outlet />
|
||||
<TanStackRouterDevtools />
|
||||
</Stack>
|
||||
),
|
||||
)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue