Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use meta functions for titles
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 702a780 commit 7b577d5
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/root.tsx
Expand Up @@ -13,6 +13,7 @@ import globalStyles from "../index.css";
import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
useCatch,
Expand Down Expand Up @@ -96,6 +97,12 @@ export async function loader({
return data;
}

export function meta() {
return {
title: "Car Crushers",
};
}

function getMarkup(
loaderData: { [k: string]: any },
child: ReactNode
Expand Down Expand Up @@ -151,8 +158,11 @@ function getMarkup(
<meta name="dsn" content={loaderData.dsn} />
) : null}
<meta name="theme-color" content="#00a8f8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<Meta />
</head>
<body>{body}</body>
</html>
Expand Down
6 changes: 6 additions & 0 deletions app/routes/admin-application.tsx
Expand Up @@ -8,6 +8,12 @@ import {
useToast,
} from "@chakra-ui/react";

export function meta() {
return {
title: "Admin Application - Car Crushers",
};
}

export default function () {
async function submit() {
const submitReq = await fetch("/api/admin-apps/submit");
Expand Down
6 changes: 6 additions & 0 deletions app/routes/appeals.tsx
Expand Up @@ -52,6 +52,12 @@ export async function loader({ context }: { context: RequestContext }) {
};
}

export function meta() {
return {
title: "Appeals - Car Crushers",
};
}

export default function () {
const pageProps = useLoaderData<typeof loader>();
const { isOpen, onClose, onOpen } = useDisclosure();
Expand Down
6 changes: 6 additions & 0 deletions app/routes/privacy.tsx
@@ -1,5 +1,11 @@
import { Container, Heading, Link, Text } from "@chakra-ui/react";

export function meta() {
return {
title: "Privacy Police - Car Crushers",
};
}

export default function () {
return (
<Container maxW="container.lg" pb="8vh" pt="4vh" textAlign="start">
Expand Down
6 changes: 6 additions & 0 deletions app/routes/report.tsx
Expand Up @@ -27,6 +27,12 @@ export async function loader({
};
}

export function meta() {
return {
title: "Report an Exploiter - Car Crushers",
};
}

export default function () {
const [fileProgress, setFileProgress] = useState(0);
const [showSuccess, setShowSuccess] = useState(false);
Expand Down
6 changes: 6 additions & 0 deletions app/routes/support.tsx
Expand Up @@ -12,6 +12,12 @@ import {
VStack,
} from "@chakra-ui/react";

export function meta() {
return {
title: "Support - Car Crushers",
};
}

export default function () {
return (
<Container
Expand Down
6 changes: 6 additions & 0 deletions app/routes/team.tsx
Expand Up @@ -11,6 +11,12 @@ import {
} from "@chakra-ui/react";
import team from "../../data/team.json";

export function meta() {
return {
title: "Our Team - Car Crushers",
};
}

export default function () {
return (
<Container maxW="container.xl" pt="4vh">
Expand Down
6 changes: 6 additions & 0 deletions app/routes/terms.tsx
@@ -1,5 +1,11 @@
import { Container, Heading, Link, Text } from "@chakra-ui/react";

export function meta() {
return {
title: "Terms and Conditions - Car Crushers",
};
}

export default function () {
return (
<Container maxW="container.lg" pb="8vh" pt="4vh" textAlign="start">
Expand Down

0 comments on commit 7b577d5

Please sign in to comment.