This commit is contained in:
2024-10-29 19:32:47 +02:00
parent b299731fcc
commit c31770a9df
9 changed files with 29 additions and 49 deletions

View File

@@ -1,8 +1,5 @@
import type { MetaFunction } from "@remix-run/node";
import { Link } from "@remix-run/react";
import { Outlet } from "react-router-dom";
import { LinkWrapper } from "~/components/LinkWrapper";
import { useMatch } from "~/hooks/useMatch";
export const meta: MetaFunction = () => {
return [
@@ -21,13 +18,8 @@ export const meta: MetaFunction = () => {
};
export default function BlogLayout() {
const { handle } = useMatch();
return (
<div className="space-y-6 px-2">
<LinkWrapper>
<Link to={handle.to}>{handle.text}</Link>
</LinkWrapper>
<div className="space-y-6 max-w-3xl mx-auto">
<Outlet />
</div>
);