diff --git a/app/routes/legal.$slug.tsx b/app/routes/_main.($lang).legal.$slug.tsx similarity index 89% rename from app/routes/legal.$slug.tsx rename to app/routes/_main.($lang).legal.$slug.tsx index 415bda52..010b4e3e 100644 --- a/app/routes/legal.$slug.tsx +++ b/app/routes/_main.($lang).legal.$slug.tsx @@ -12,9 +12,6 @@ export async function loader({ params }: LoaderFunctionArgs) { const { slug } = params; if (!slug) { - // we know we can't render the component - // so throw immediately to stop executing code - // and show the not found page throw new Response('Not Found', { status: 404 }); } @@ -42,7 +39,7 @@ export const meta: MetaFunction = ({ data, params }) => { }); }; -export default function Index() { +export default function LegalPage() { const { page } = useLoaderData(); return (
+ + + + + + + ); +} diff --git a/app/routes/legal.tsx b/app/routes/legal.tsx deleted file mode 100644 index 71f9c96f..00000000 --- a/app/routes/legal.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Outlet } from 'react-router'; - -import { Grid, GridItem } from '@ocobo/styled-system/jsx'; - -import { LayoutMain } from '~/components/LayoutMain'; -import { Container } from '~/components/ui/Container'; - -export default function Index() { - return ( - - - - - - - - - - ); -}