Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down Expand Up @@ -42,7 +39,7 @@ export const meta: MetaFunction<typeof loader> = ({ data, params }) => {
});
};

export default function Index() {
export default function LegalPage() {
const { page } = useLoaderData<typeof loader>();
return (
<article
Expand Down
17 changes: 17 additions & 0 deletions app/routes/_main.($lang).legal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Outlet } from 'react-router';

import { Grid, GridItem } from '@ocobo/styled-system/jsx';

import { Container } from '~/components/ui/Container';

export default function LegalLayout() {
return (
<Container isMobileFullWidth>
<Grid columns={{ base: 1, lg: 6 }}>
<GridItem colSpan={4}>
<Outlet />
</GridItem>
</Grid>
</Container>
);
}
20 changes: 0 additions & 20 deletions app/routes/legal.tsx

This file was deleted.

Loading