refactor: flatten routes

This commit is contained in:
Andrea
2024-09-25 09:26:35 +02:00
parent e14a7ffb3d
commit 888f6c3b01
5 changed files with 3 additions and 3 deletions

17
app/routes/blog.tsx Normal file
View File

@@ -0,0 +1,17 @@
import { Link } from "@remix-run/react";
import { Outlet } from "react-router-dom";
import { LinkWrapper } from "~/components/LinkWrapper";
import { useMatch } from "~/hooks/useMatch";
export default function () {
const { handle } = useMatch();
return (
<div>
<LinkWrapper>
<Link to={handle.to}>{handle.text}</Link>
</LinkWrapper>
<Outlet />
</div>
);
}