From 7b577d5c8970cb7a2cab93ee510f32dcaa98017f Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:49:20 -0400 Subject: [PATCH] Use meta functions for titles --- app/root.tsx | 14 ++++++++++++-- app/routes/admin-application.tsx | 6 ++++++ app/routes/appeals.tsx | 6 ++++++ app/routes/privacy.tsx | 6 ++++++ app/routes/report.tsx | 6 ++++++ app/routes/support.tsx | 6 ++++++ app/routes/team.tsx | 6 ++++++ app/routes/terms.tsx | 6 ++++++ 8 files changed, 54 insertions(+), 2 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index 4f610c3..cd097c5 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -13,6 +13,7 @@ import globalStyles from "../index.css"; import { Links, LiveReload, + Meta, Outlet, Scripts, useCatch, @@ -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 @@ -151,8 +158,11 @@ function getMarkup( ) : null} - - + + {body} diff --git a/app/routes/admin-application.tsx b/app/routes/admin-application.tsx index 852522a..48c5819 100644 --- a/app/routes/admin-application.tsx +++ b/app/routes/admin-application.tsx @@ -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"); diff --git a/app/routes/appeals.tsx b/app/routes/appeals.tsx index 74aa492..505e835 100644 --- a/app/routes/appeals.tsx +++ b/app/routes/appeals.tsx @@ -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(); const { isOpen, onClose, onOpen } = useDisclosure(); diff --git a/app/routes/privacy.tsx b/app/routes/privacy.tsx index d9179fd..2621897 100644 --- a/app/routes/privacy.tsx +++ b/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 ( diff --git a/app/routes/report.tsx b/app/routes/report.tsx index f1d0447..5395e8b 100644 --- a/app/routes/report.tsx +++ b/app/routes/report.tsx @@ -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); diff --git a/app/routes/support.tsx b/app/routes/support.tsx index e785c8c..d4b4469 100644 --- a/app/routes/support.tsx +++ b/app/routes/support.tsx @@ -12,6 +12,12 @@ import { VStack, } from "@chakra-ui/react"; +export function meta() { + return { + title: "Support - Car Crushers", + }; +} + export default function () { return ( diff --git a/app/routes/terms.tsx b/app/routes/terms.tsx index eeaf009..5ac3e9b 100644 --- a/app/routes/terms.tsx +++ b/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 (