diff options
-rw-r--r-- | package-lock.json | 95 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | vnext/src/index.js | 17 | ||||
-rw-r--r-- | vnext/src/ui/Chat.js | 2 | ||||
-rw-r--r-- | vnext/src/ui/Contacts.js | 2 | ||||
-rw-r--r-- | vnext/src/ui/Feeds.js | 2 | ||||
-rw-r--r-- | vnext/src/ui/Post.js | 2 | ||||
-rw-r--r-- | vnext/src/ui/Settings.js | 2 | ||||
-rw-r--r-- | vnext/src/ui/Thread.js | 2 | ||||
-rw-r--r-- | vnext/src/ui/Users.js | 2 |
10 files changed, 71 insertions, 57 deletions
diff --git a/package-lock.json b/package-lock.json index 39c487e9..2f01d165 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "react-content-loader": "^6.2.1", "react-cookie": "^6.1.1", "react-dom": "^18.2.0", - "react-helmet": "^6.1.0", + "react-helmet-async": "^1.3.0", "react-hook-form": "^7.47.0", "react-hot-toast": "^2.4.1", "react-router-dom": "^6.16.0", @@ -1896,7 +1896,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", - "dev": true, "dependencies": { "regenerator-runtime": "^0.13.4" }, @@ -1907,8 +1906,7 @@ "node_modules/@babel/runtime/node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/@babel/template": { "version": "7.22.15", @@ -10717,6 +10715,14 @@ "node": ">=10.13.0" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -16245,22 +16251,24 @@ } }, "node_modules/react-fast-compare": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", - "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" }, - "node_modules/react-helmet": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", - "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "node_modules/react-helmet-async": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", "dependencies": { - "object-assign": "^4.1.1", + "@babel/runtime": "^7.12.5", + "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" }, "peerDependencies": { - "react": ">=16.3.0" + "react": "^16.6.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0" } }, "node_modules/react-hook-form": { @@ -16342,14 +16350,6 @@ "react": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-side-effect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", - "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", - "peerDependencies": { - "react": "^16.3.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-test-renderer": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.2.0.tgz", @@ -17245,6 +17245,11 @@ "node": ">=8" } }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -20731,7 +20736,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz", "integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==", - "dev": true, "requires": { "regenerator-runtime": "^0.13.4" }, @@ -20739,8 +20743,7 @@ "regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" } } }, @@ -26884,6 +26887,14 @@ "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -30705,19 +30716,20 @@ } }, "react-fast-compare": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", - "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" }, - "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.3.0", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", "requires": { - "object-assign": "^4.1.1", + "@babel/runtime": "^7.12.5", + "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-hook-form": { @@ -30767,12 +30779,6 @@ "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" } }, - "react-side-effect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", - "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", - "requires": {} - }, "react-test-renderer": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.2.0.tgz", @@ -31466,6 +31472,11 @@ "kind-of": "^6.0.2" } }, + "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": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/package.json b/package.json index ad190b0a..4698b99c 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "react-content-loader": "^6.2.1", "react-cookie": "^6.1.1", "react-dom": "^18.2.0", - "react-helmet": "^6.1.0", + "react-helmet-async": "^1.3.0", "react-hook-form": "^7.47.0", "react-hot-toast": "^2.4.1", "react-router-dom": "^6.16.0", diff --git a/vnext/src/index.js b/vnext/src/index.js index 0c936257..77f152af 100644 --- a/vnext/src/index.js +++ b/vnext/src/index.js @@ -12,6 +12,7 @@ import { StrictMode, lazy } from 'react' import { createRoot, hydrateRoot } from 'react-dom/client' import { BrowserRouter } from 'react-router-dom' import { CookiesProvider } from 'react-cookie' +import { HelmetProvider } from 'react-helmet-async' import { VisitorProvider } from './ui/VisitorContext' @@ -20,13 +21,15 @@ const props = window.__PROPS__ ? JSON.parse(decodeURIComponent(escape(atob(windo const JuickApp = () => ( <StrictMode> - <VisitorProvider> - <CookiesProvider> - <BrowserRouter> - <Juick {...props} /> - </BrowserRouter> - </CookiesProvider> - </VisitorProvider> + <HelmetProvider> + <VisitorProvider> + <CookiesProvider> + <BrowserRouter> + <Juick {...props} /> + </BrowserRouter> + </CookiesProvider> + </VisitorProvider> + </HelmetProvider> </StrictMode> ) diff --git a/vnext/src/ui/Chat.js b/vnext/src/ui/Chat.js index 55b89d09..4556848c 100644 --- a/vnext/src/ui/Chat.js +++ b/vnext/src/ui/Chat.js @@ -11,7 +11,7 @@ import UserInfo from './UserInfo' import { getChat, pm } from '../api' import { useVisitor } from './VisitorContext' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' /** * diff --git a/vnext/src/ui/Contacts.js b/vnext/src/ui/Contacts.js index 1c23f042..8a67961c 100644 --- a/vnext/src/ui/Contacts.js +++ b/vnext/src/ui/Contacts.js @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' import { getChats } from '../api' diff --git a/vnext/src/ui/Feeds.js b/vnext/src/ui/Feeds.js index 086a910e..bb386e5a 100644 --- a/vnext/src/ui/Feeds.js +++ b/vnext/src/ui/Feeds.js @@ -12,7 +12,7 @@ import UserInfo from './UserInfo' import { getMessages } from '../api' import { useVisitor } from './VisitorContext' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' /** * @typedef {object} Query diff --git a/vnext/src/ui/Post.js b/vnext/src/ui/Post.js index 6f7d1e93..ed333236 100644 --- a/vnext/src/ui/Post.js +++ b/vnext/src/ui/Post.js @@ -6,7 +6,7 @@ import MessageInput from './MessageInput' import { post, update } from '../api' import { useVisitor } from './VisitorContext' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' /** * diff --git a/vnext/src/ui/Settings.js b/vnext/src/ui/Settings.js index 1205cd49..82a84be9 100644 --- a/vnext/src/ui/Settings.js +++ b/vnext/src/ui/Settings.js @@ -7,7 +7,7 @@ import Icon from './Icon' import UploadButton from './UploadButton' import Avatar from './Avatar' import { useVisitor } from './VisitorContext' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' /** * @param {{ onChange: Function }} props diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js index b727b73d..61474153 100644 --- a/vnext/src/ui/Thread.js +++ b/vnext/src/ui/Thread.js @@ -8,7 +8,7 @@ import Spinner from './Spinner' import { getMessages, comment, update, post } from '../api' import { useVisitor } from './VisitorContext' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' /** * @type { import('../api').Message } */ diff --git a/vnext/src/ui/Users.js b/vnext/src/ui/Users.js index e4fcba1f..0ab9e44b 100644 --- a/vnext/src/ui/Users.js +++ b/vnext/src/ui/Users.js @@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom' import UserInfo from './UserInfo' import Avatar from './Avatar' -import { Helmet } from 'react-helmet' +import { Helmet } from 'react-helmet-async' /** * Friends feed |