diff --git a/package-lock.json b/package-lock.json index b7a863fee50cc74507cc71205d1ff03261b7bdcd..84a988eb4c2e25654f70b80124a91468f171da24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14556,15 +14556,16 @@ } } }, - "react-helmet": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", - "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "react-helmet-async": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.0.7.tgz", + "integrity": "sha512-By90p5uxAriGukbyejq2poK41DwTxpNWOpOjN8mIyX/BKrCd3+sXZ5pHUZXjHyjR5OYS7PGsOD9dbM61YxfFmA==", "requires": { - "object-assign": "^4.1.1", + "@babel/runtime": "^7.11.2", + "invariant": "^2.2.4", "prop-types": "^15.7.2", - "react-fast-compare": "^3.1.1", - "react-side-effect": "^2.1.0" + "react-fast-compare": "^3.2.0", + "shallowequal": "^1.1.0" } }, "react-intersection-observer": { @@ -15028,11 +15029,6 @@ } } }, - "react-side-effect": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.1.tgz", - "integrity": "sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ==" - }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -15862,6 +15858,11 @@ } } }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/package.json b/package.json index 18f803ea191c3861545fe80a86252258095c9c4d..51d186e75a063663b00f80c102d2e22b4bc2447b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "pullstate": "^1.20.5", "react": "^16.13.1", "react-dom": "^16.13.1", - "react-helmet": "^6.1.0", + "react-helmet-async": "^1.0.7", "react-intersection-observer": "^8.31.0", "react-joyride": "^2.3.0", "react-mde": "^11.0.0", diff --git a/src/App.jsx b/src/App.jsx index 0ceedc5779d84bc3c0af762aadde9adc5be5b4af..6fd6b79113920936464d17dab8b1ee7f1f202bfe 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,5 +1,5 @@ import React, { Suspense } from "react"; -import { Helmet } from "react-helmet"; +import { Helmet, HelmetProvider } from "react-helmet-async"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import { KeycloakProvider } from "@react-keycloak/web"; import * as Sentry from "@sentry/react"; @@ -85,28 +85,30 @@ const BaseApp = () => { initializeWSChannel.read(); return ( - <Router> - <Helmet> - <title>CF 2021 | Pirátská strana</title> - <meta - name="description" - content="OficiálnĂ stránka letošnĂho roÄŤnĂku on-line zasedánĂ CelostátnĂho fĂłra ÄŚeskĂ© pirátskĂ© strany, 9. 1. 2021." - /> - <meta property="og:title" content="CF 2021" /> - <meta - property="og:description" - content="OficiálnĂ stránka letošnĂho roÄŤnĂku on-line zasedánĂ CelostátnĂho fĂłra ÄŚeskĂ© pirátskĂ© strany, 9. 1. 2021." - /> - </Helmet> - <Navbar /> - <Switch> - <Route exact path="/" children={<Home />} /> - <Route exact path="/program" children={<Program />} /> - <Route exact path="/protocol" children={<Protocol />} /> - <Route component={NotFound} /> - </Switch> - <Footer /> - </Router> + <HelmetProvider> + <Router> + <Helmet> + <title>CF 2021 | Pirátská strana</title> + <meta + name="description" + content="OficiálnĂ stránka letošnĂho roÄŤnĂku on-line zasedánĂ CelostátnĂho fĂłra ÄŚeskĂ© pirátskĂ© strany, 9. 1. 2021." + /> + <meta property="og:title" content="CF 2021" /> + <meta + property="og:description" + content="OficiálnĂ stránka letošnĂho roÄŤnĂku on-line zasedánĂ CelostátnĂho fĂłra ÄŚeskĂ© pirátskĂ© strany, 9. 1. 2021." + /> + </Helmet> + <Navbar /> + <Switch> + <Route exact path="/" children={<Home />} /> + <Route exact path="/program" children={<Program />} /> + <Route exact path="/protocol" children={<Protocol />} /> + <Route component={NotFound} /> + </Switch> + <Footer /> + </Router> + </HelmetProvider> ); }; diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index 1115287ce3a4222edeca1c5b09fd91730f4fd43a..e2c56027b047a1ffb5e0b22c72470fc36b411d78 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Helmet } from "react-helmet"; +import { Helmet } from "react-helmet-async"; import Joyride, { EVENTS } from "react-joyride"; import ReactPlayer from "react-player/lazy"; import useWindowSize from "@rooks/use-window-size"; diff --git a/src/pages/NotFound.jsx b/src/pages/NotFound.jsx index ee171f42370e2fec7edddbbad7619e9e8bc2633d..86715b687ec205868c5cfd942675185dec2b122e 100644 --- a/src/pages/NotFound.jsx +++ b/src/pages/NotFound.jsx @@ -1,5 +1,5 @@ import React from "react"; -import { Helmet } from "react-helmet"; +import { Helmet } from "react-helmet-async"; import Button from "components/Button"; diff --git a/src/pages/Program.jsx b/src/pages/Program.jsx index 9e78c06e23297a82f877e320a65a6737bf1f09f1..0ed75f89ddd63fbb5c964800c30c76b386152209 100644 --- a/src/pages/Program.jsx +++ b/src/pages/Program.jsx @@ -1,5 +1,5 @@ import React from "react"; -import { Helmet } from "react-helmet"; +import { Helmet } from "react-helmet-async"; import { Link } from "react-router-dom"; import { format } from "date-fns"; diff --git a/src/pages/Protocol.jsx b/src/pages/Protocol.jsx index 9b51c4ea2cbc3c18b54696f7f0047b84ad590382..8700e292c20b4ff4adfb77ee76b0443507652f1e 100644 --- a/src/pages/Protocol.jsx +++ b/src/pages/Protocol.jsx @@ -1,5 +1,5 @@ import React, { useCallback, useState } from "react"; -import { Helmet } from "react-helmet"; +import { Helmet } from "react-helmet-async"; import useInterval from "@rooks/use-interval"; import { loadProtocol } from "actions/global-info";