inital commit

This commit is contained in:
2024-02-25 06:06:21 +03:00
commit 74c2dfa827
25 changed files with 427 additions and 0 deletions

20
src/routes/__root.tsx Normal file
View File

@@ -0,0 +1,20 @@
import {createRootRoute, Link, Outlet} from "@tanstack/react-router";
import {TanStackRouterDevtools} from '@tanstack/router-devtools'
export const Route = createRootRoute({
component: () => (
<>
<div className="p-2 flex gap-2">
<Link to="/" className="[&.active]:font-bold">
Home
</Link>{' '}
<Link to="/test" className="[&.active]:font-bold">
Test
</Link>{' '}
</div>
<Outlet/>
<TanStackRouterDevtools/>
</>
),
})

View File

@@ -0,0 +1,6 @@
import {createLazyFileRoute} from "@tanstack/react-router";
import MainPage from "../pages/MainPage/MainPage.tsx";
export const Route = createLazyFileRoute('/')({
component: MainPage,
})

18
src/routes/test.lazy.tsx Normal file
View File

@@ -0,0 +1,18 @@
import {createLazyFileRoute} from "@tanstack/react-router";
import {Button} from "@mantine/core";
import {notifications} from "@mantine/notifications";
export const Route = createLazyFileRoute('/test')({
component: TestPage
})
function TestPage() {
return (
<>
<Button onClick={() => {
notifications.show({title: "test", message: "хуй"})
}}>TEST</Button>
</>
)
}