Use meta functions for titles

This commit is contained in:
regalijan 2023-10-19 16:49:20 -04:00
parent 702a780b3c
commit 7b577d5c89
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520
8 changed files with 54 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import globalStyles from "../index.css";
import { import {
Links, Links,
LiveReload, LiveReload,
Meta,
Outlet, Outlet,
Scripts, Scripts,
useCatch, useCatch,
@ -96,6 +97,12 @@ export async function loader({
return data; return data;
} }
export function meta() {
return {
title: "Car Crushers",
};
}
function getMarkup( function getMarkup(
loaderData: { [k: string]: any }, loaderData: { [k: string]: any },
child: ReactNode child: ReactNode
@ -151,8 +158,11 @@ function getMarkup(
<meta name="dsn" content={loaderData.dsn} /> <meta name="dsn" content={loaderData.dsn} />
) : null} ) : null}
<meta name="theme-color" content="#00a8f8" /> <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> </head>
<body>{body}</body> <body>{body}</body>
</html> </html>

View File

@ -8,6 +8,12 @@ import {
useToast, useToast,
} from "@chakra-ui/react"; } from "@chakra-ui/react";
export function meta() {
return {
title: "Admin Application - Car Crushers",
};
}
export default function () { export default function () {
async function submit() { async function submit() {
const submitReq = await fetch("/api/admin-apps/submit"); const submitReq = await fetch("/api/admin-apps/submit");

View File

@ -52,6 +52,12 @@ export async function loader({ context }: { context: RequestContext }) {
}; };
} }
export function meta() {
return {
title: "Appeals - Car Crushers",
};
}
export default function () { export default function () {
const pageProps = useLoaderData<typeof loader>(); const pageProps = useLoaderData<typeof loader>();
const { isOpen, onClose, onOpen } = useDisclosure(); const { isOpen, onClose, onOpen } = useDisclosure();

View File

@ -1,5 +1,11 @@
import { Container, Heading, Link, Text } from "@chakra-ui/react"; import { Container, Heading, Link, Text } from "@chakra-ui/react";
export function meta() {
return {
title: "Privacy Police - Car Crushers",
};
}
export default function () { export default function () {
return ( return (
<Container maxW="container.lg" pb="8vh" pt="4vh" textAlign="start"> <Container maxW="container.lg" pb="8vh" pt="4vh" textAlign="start">

View File

@ -27,6 +27,12 @@ export async function loader({
}; };
} }
export function meta() {
return {
title: "Report an Exploiter - Car Crushers",
};
}
export default function () { export default function () {
const [fileProgress, setFileProgress] = useState(0); const [fileProgress, setFileProgress] = useState(0);
const [showSuccess, setShowSuccess] = useState(false); const [showSuccess, setShowSuccess] = useState(false);

View File

@ -12,6 +12,12 @@ import {
VStack, VStack,
} from "@chakra-ui/react"; } from "@chakra-ui/react";
export function meta() {
return {
title: "Support - Car Crushers",
};
}
export default function () { export default function () {
return ( return (
<Container <Container

View File

@ -11,6 +11,12 @@ import {
} from "@chakra-ui/react"; } from "@chakra-ui/react";
import team from "../../data/team.json"; import team from "../../data/team.json";
export function meta() {
return {
title: "Our Team - Car Crushers",
};
}
export default function () { export default function () {
return ( return (
<Container maxW="container.xl" pt="4vh"> <Container maxW="container.xl" pt="4vh">

View File

@ -1,5 +1,11 @@
import { Container, Heading, Link, Text } from "@chakra-ui/react"; import { Container, Heading, Link, Text } from "@chakra-ui/react";
export function meta() {
return {
title: "Terms and Conditions - Car Crushers",
};
}
export default function () { export default function () {
return ( return (
<Container maxW="container.lg" pb="8vh" pt="4vh" textAlign="start"> <Container maxW="container.lg" pb="8vh" pt="4vh" textAlign="start">