Use meta functions for titles

This commit is contained in:
2023-10-19 16:49:20 -04:00
parent 702a780b3c
commit 7b577d5c89
8 changed files with 54 additions and 2 deletions

View File

@ -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(
<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>