Skip to content

Commit

Permalink
fix: Strapi v4.11.0 react18 destroy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cyp3rius committed Jun 8, 2023
1 parent f29aeab commit 44a0fde
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 24 deletions.
12 changes: 8 additions & 4 deletions admin/src/pages/View/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,14 @@ const View = () => {

const structureHasErrors = !validateNavigationStructure((changedActiveNavigation || {}).items);

useEffect(() => structureHasErrors && toggleNotification({
type: 'warning',
message: getTrad('notification.error.item.relation'),
}), [structureHasErrors]);
useEffect(() => {
if(structureHasErrors) {
toggleNotification({
type: 'warning',
message: getTrad('notification.error.item.relation'),
});
}
}, [structureHasErrors]);

const navigationSelectValue = get(activeNavigation, "id", null);
const handleSave = () => isLoadingForSubmit || structureHasErrors
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-plugin-navigation",
"version": "2.2.10",
"version": "2.2.11",
"description": "Strapi - Navigation plugin",
"strapi": {
"name": "navigation",
Expand All @@ -26,9 +26,9 @@
"@strapi/utils": "^4.11.0",
"lodash": "^4.17.11",
"pluralize": "^8.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-intl": "6.3.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intl": "6.4.1",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"uuid": "^8.3.0"
Expand Down
95 changes: 79 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,15 @@
"@formatjs/icu-skeleton-parser" "1.3.18"
tslib "^2.4.0"

"@formatjs/icu-messageformat-parser@2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.3.1.tgz#953080ea5c053bc73bdf55d0a524a3c3c133ae6b"
integrity sha512-knF2AkAKN4Upv4oIiKY4Wd/dLH68TNMPgV/tJMu/T6FP9aQwbv8fpj7U3lkyniPaNVxvia56Gxax8MKOjtxLSQ==
dependencies:
"@formatjs/ecma402-abstract" "1.14.3"
"@formatjs/icu-skeleton-parser" "1.3.18"
tslib "^2.4.0"

"@formatjs/icu-skeleton-parser@1.3.18":
version "1.3.18"
resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.18.tgz#7aed3d60e718c8ad6b0e64820be44daa1e29eeeb"
Expand All @@ -670,6 +679,15 @@
"@formatjs/intl-localematcher" "0.2.32"
tslib "^2.4.0"

"@formatjs/intl-displaynames@6.3.1":
version "6.3.1"
resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.3.1.tgz#6dcea7cb801460e2a8fa63eb38c54aa1b24f92c0"
integrity sha512-TlxguMDUbnFrJ4NA8fSyqXC62M7czvlRJ5mrJgtB91JVA+QPjjNdcRm1qPIC/DcU/pGUDcEzThn/x5A+jp15gg==
dependencies:
"@formatjs/ecma402-abstract" "1.14.3"
"@formatjs/intl-localematcher" "0.2.32"
tslib "^2.4.0"

"@formatjs/intl-listformat@7.1.9":
version "7.1.9"
resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.1.9.tgz#0c2ce67b610054f215dd2635a6da7da308cfbe3d"
Expand All @@ -679,6 +697,15 @@
"@formatjs/intl-localematcher" "0.2.32"
tslib "^2.4.0"

"@formatjs/intl-listformat@7.2.1":
version "7.2.1"
resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.2.1.tgz#874eddc7d53ba2e3fd911bf30efc459fc99f08db"
integrity sha512-fRJFWLrGa7d25I4JSxNjKX29oXGcIXx8fJjgURnvs2C3ijS4gurUgFrUwLbv/2KfPfyJ5g567pz2INelNJZBdw==
dependencies:
"@formatjs/ecma402-abstract" "1.14.3"
"@formatjs/intl-localematcher" "0.2.32"
tslib "^2.4.0"

"@formatjs/intl-localematcher@0.2.32":
version "0.2.32"
resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.2.32.tgz#00d4d307cd7d514b298e15a11a369b86c8933ec1"
Expand All @@ -699,6 +726,19 @@
intl-messageformat "10.3.3"
tslib "^2.4.0"

"@formatjs/intl@2.7.1":
version "2.7.1"
resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.7.1.tgz#f7e052ff09e9fe019ad83d4139af0de40084a2ae"
integrity sha512-se6vxidsN3PCmzqTsDd3YDT4IX9ZySPy39LYhF7x2ssNvlGMOuW3umkrIhKkXB7ZskqsJGY53LVCdiHsSwhGng==
dependencies:
"@formatjs/ecma402-abstract" "1.14.3"
"@formatjs/fast-memoize" "2.0.1"
"@formatjs/icu-messageformat-parser" "2.3.1"
"@formatjs/intl-displaynames" "6.3.1"
"@formatjs/intl-listformat" "7.2.1"
intl-messageformat "10.3.4"
tslib "^2.4.0"

"@graphql-tools/merge@8.3.0":
version "8.3.0"
resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.0.tgz#d3a8ba10942f8598788c3e03f97cc1d0c0b055f8"
Expand Down Expand Up @@ -2941,6 +2981,16 @@ intl-messageformat@10.3.3:
"@formatjs/icu-messageformat-parser" "2.3.0"
tslib "^2.4.0"

intl-messageformat@10.3.4:
version "10.3.4"
resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.3.4.tgz#20f064c28b46fa6d352a4c4ba5e9bfc597af3eba"
integrity sha512-/FxUIrlbPtuykSNX85CB5sp2FjLVeTmdD7TfRkVFPft2n4FgcSlAcilFytYiFAEmPHc+0PvpLCIPXeaGFzIvOg==
dependencies:
"@formatjs/ecma402-abstract" "1.14.3"
"@formatjs/fast-memoize" "2.0.1"
"@formatjs/icu-messageformat-parser" "2.3.1"
tslib "^2.4.0"

is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
Expand Down Expand Up @@ -4091,14 +4141,13 @@ raw-body@^2.3.3:
iconv-lite "0.4.24"
unpipe "1.0.0"

react-dom@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
scheduler "^0.20.2"
scheduler "^0.23.0"

react-fast-compare@^2.0.1:
version "2.0.4"
Expand Down Expand Up @@ -4136,6 +4185,22 @@ react-intl@*, react-intl@6.3.2:
intl-messageformat "10.3.3"
tslib "^2.4.0"

react-intl@6.4.1:
version "6.4.1"
resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.4.1.tgz#01e4bd5497cb93d87146e966d8eda25851d4d9b6"
integrity sha512-/aT5595AEMZ+Pjmt8W2R5/ZkYJmyyd6jTzHzqhJ1LnfeG36+N5huBtykxYhHqLc1BrIRQ1fTX1orYC0Ej5ojtg==
dependencies:
"@formatjs/ecma402-abstract" "1.14.3"
"@formatjs/icu-messageformat-parser" "2.3.1"
"@formatjs/intl" "2.7.1"
"@formatjs/intl-displaynames" "6.3.1"
"@formatjs/intl-listformat" "7.2.1"
"@types/hoist-non-react-statics" "^3.3.1"
"@types/react" "16 || 17 || 18"
hoist-non-react-statics "^3.3.2"
intl-messageformat "10.3.4"
tslib "^2.4.0"

react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
Expand Down Expand Up @@ -4204,13 +4269,12 @@ react-transition-group@^4.3.0:
loose-envify "^1.4.0"
prop-types "^15.6.2"

react@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
react@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

readdirp@~3.6.0:
version "3.6.0"
Expand Down Expand Up @@ -4304,13 +4368,12 @@ saxes@^5.0.1:
dependencies:
xmlchars "^2.2.0"

scheduler@^0.20.2:
version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
scheduler@^0.23.0:
version "0.23.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

semver@7.x, semver@^7.3.2:
version "7.3.7"
Expand Down

0 comments on commit 44a0fde

Please sign in to comment.