Remove react-helmet-async

This commit is contained in:
2023-10-19 16:49:19 -04:00
parent e87521f880
commit 702a780b3c
3 changed files with 9 additions and 57 deletions

View File

@ -10,7 +10,6 @@ import { ClientStyleContext, ServerStyleContext } from "./context.js";
import fontStyle from "@fontsource/plus-jakarta-sans/index.css";
import Forbidden from "../components/Forbidden.js";
import globalStyles from "../index.css";
import { HelmetProvider } from "react-helmet-async";
import {
Links,
LiveReload,
@ -118,8 +117,6 @@ function getMarkup(
clientStyleData?.reset();
}, []);
const helmetContext: { [k: string]: any } = {};
const body = (
<StrictMode>
<ChakraProvider
@ -128,20 +125,16 @@ function getMarkup(
)}
theme={theme}
>
<HelmetProvider>
<div className="App">
<Navigation {...loaderData} />
{children}
<Scripts />
<LiveReload />
</div>
</HelmetProvider>
<div className="App">
<Navigation {...loaderData} />
{children}
<Scripts />
<LiveReload />
</div>
</ChakraProvider>
</StrictMode>
);
const { helmet } = helmetContext;
return (
<html lang="en-US">
<head>
@ -159,8 +152,7 @@ function getMarkup(
) : null}
<meta name="theme-color" content="#00a8f8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{helmet?.meta?.toString()}
{helmet?.title?.toString() ?? <title>Car Crushers</title>}
</head>
<body>{body}</body>
</html>