chore: configure root eslint with react and tanstack router rules
This commit is contained in:
parent
88ad6ff276
commit
2025cc7298
22 changed files with 664 additions and 485 deletions
20
apps/web/src/routes/__root.tsx
Normal file
20
apps/web/src/routes/__root.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { createRootRoute, Link, Outlet } from "@tanstack/react-router";
|
||||
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
||||
|
||||
const RootLayout = () => (
|
||||
<>
|
||||
<div className="p-2 flex gap-2">
|
||||
<Link to="/" className="[&.active]:font-bold">
|
||||
Home
|
||||
</Link>{" "}
|
||||
<Link to="/about" className="[&.active]:font-bold">
|
||||
About
|
||||
</Link>
|
||||
</div>
|
||||
<hr />
|
||||
<Outlet />
|
||||
<TanStackRouterDevtools />
|
||||
</>
|
||||
);
|
||||
|
||||
export const Route = createRootRoute({ component: RootLayout });
|
||||
7
apps/web/src/routes/about.tsx
Normal file
7
apps/web/src/routes/about.tsx
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/about")({ component: About });
|
||||
|
||||
function About() {
|
||||
return <div className="p-2">Hello from About!</div>;
|
||||
}
|
||||
11
apps/web/src/routes/index.tsx
Normal file
11
apps/web/src/routes/index.tsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/")({ component: Index });
|
||||
|
||||
function Index() {
|
||||
return (
|
||||
<div className="p-2">
|
||||
<h3>Welcome Home!</h3>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue