Use meta functions for titles
This commit is contained in:
14
app/root.tsx
14
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(
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user