Open History to see the last commit
1import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
2β
3export const Route = createFileRoute('/_first/_second-layout')({
4 component: LayoutComponent,
5})
6β
7function LayoutComponent() {
8 return (
9 <div>
10 <div>I'm a nested layout</div>
11 <div className="flex gap-2 border-b">
12 <Link
13 to="/route-without-file/layout-a"
14 activeProps={{
15 className: 'font-bold',
16 }}
17 >
18 Layout A
19 </Link>
20 <Link
21 to="/route-without-file/layout-b"
22 activeProps={{
23 className: 'font-bold',
24 }}
25 >
26 Layout B
27 </Link>
28 </div>
29 <div>
30 <Outlet />
31 </div>
32 </div>
33 )
34}