Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove react-helmet-async
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent e87521f commit 702a780
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 57 deletions.
22 changes: 7 additions & 15 deletions app/root.tsx
Expand Up @@ -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,
Expand Down Expand Up @@ -118,8 +117,6 @@ function getMarkup(
clientStyleData?.reset();
}, []);

const helmetContext: { [k: string]: any } = {};

const body = (
<StrictMode>
<ChakraProvider
Expand All @@ -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>
Expand All @@ -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>
Expand Down
41 changes: 1 addition & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -20,8 +20,7 @@
"@sentry/tracing": "^7.42.0",
"framer-motion": "^10.2.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^1.3.0"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^1.14.1",
Expand Down

0 comments on commit 702a780

Please sign in to comment.