Remove react-helmet-async
This commit is contained in:
22
app/root.tsx
22
app/root.tsx
@ -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>
|
||||
|
Reference in New Issue
Block a user