Skip to content

Commit

Permalink
monthly maintenance, upgrade react to 19 (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharqiewicz authored Jan 7, 2025
1 parent ec14832 commit a77265e
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 37 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,24 @@
"@tanstack/react-query-devtools": "~4.32.6",
"@tanstack/react-table": "^8.11.2",
"@testing-library/react": "^16.0.1",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/universal-provider": "^2.11.1",
"big.js": "^6.2.1",
"bs58": "^5.0.0",
"framer-motion": "^11.11.9",
"graphql": "~16.9.0",
"graphql-request": "~6.1.0",
"lodash": "^4.17.21",
"luxon": "^3.5.0",
"match-sorter": "^6.3.1",
"motion": "^11.15.0",
"qrcode.react": "^3.1.0",
"react": "^18.3.1",
"react": "^19.0.0",
"react-daisyui": "^5.0.5",
"react-device-detect": "^2.2.3",
"react-dom": "^18.3.1",
"react-dom": "^19.0.0",
"react-hook-form": "^7.53.0",
"react-lottie": "^1.2.4",
"react-lottie": "^1.2.10",
"react-router-dom": "^6.27.0",
"react-toastify": "^9.1.3",
"ts-jest": "^29.2.5",
Expand All @@ -90,8 +89,9 @@
"@types/lodash": "^4.17.10",
"@types/luxon": "^3.3.7",
"@types/node": "^18.19.4",
"@types/react": "^18.2.46",
"@types/react-lottie": "^1",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@types/react-lottie": "^1.2.10",
"@types/testing-library__jest-dom": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/GlobalStateProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const defaultTenant = TenantName.Pendulum;
const GlobalStateContext = createContext<GlobalState | undefined>(undefined);

const GlobalStateProvider = ({ children }: { children: JSX.Element }) => {
const tenantRef = useRef<string>();
const tenantRef = useRef<string>('');
const [walletAccount, setWallet] = useState<WalletAccount | undefined>(undefined);
const { pathname } = useLocation();
const network = pathname.split('/').filter(Boolean)[0]?.toLowerCase();
Expand Down
8 changes: 5 additions & 3 deletions src/components/Layout/NavCollapseButtonContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react';
import Lottie from 'react-lottie';
import Lottie, { LottieProps } from 'react-lottie';

import { LinkItem, isLottieOptions } from './links';

Expand All @@ -8,10 +8,12 @@ interface NavButtonContentProps {
isPlaying: boolean;
}

const LottieComponent = Lottie as unknown as FC<LottieProps>;

export const NavCollapseButtonContent: FC<NavButtonContentProps> = ({ item, isPlaying }) => (
<>
{isLottieOptions(item.prefix) ? (
<Lottie
<LottieComponent
options={item.prefix.lottieOptions}
isStopped={!isPlaying}
isClickToPauseDisabled={true}
Expand All @@ -22,7 +24,7 @@ export const NavCollapseButtonContent: FC<NavButtonContentProps> = ({ item, isPl
)}
{isLottieOptions(item.title) ? (
<span>
<Lottie
<LottieComponent
options={item.title.lottieOptions}
isStopped={!isPlaying}
isClickToPauseDisabled={true}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs/Tab/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

export interface TabProps<T> {
index: T;
Expand Down
131 changes: 106 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4629,7 +4629,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.0, @types/react-dom@npm:^18.3.1":
"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.0":
version: 18.3.1
resolution: "@types/react-dom@npm:18.3.1"
dependencies:
Expand All @@ -4638,7 +4638,16 @@ __metadata:
languageName: node
linkType: hard

"@types/react-lottie@npm:^1":
"@types/react-dom@npm:^19.0.2":
version: 19.0.2
resolution: "@types/react-dom@npm:19.0.2"
peerDependencies:
"@types/react": ^19.0.0
checksum: 10c0/3d0c7b78dbe8df64ea769f30af990a5950173a8321c745fe11094d765423f7964c3519dca6e7cd36b4be6521c8efc690bdd3b79b327b229dd1e9d5a8bad677dd
languageName: node
linkType: hard

"@types/react-lottie@npm:^1.2.10":
version: 1.2.10
resolution: "@types/react-lottie@npm:1.2.10"
dependencies:
Expand All @@ -4647,7 +4656,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:^18.2.31, @types/react@npm:^18.2.46":
"@types/react@npm:*, @types/react@npm:^18.2.31":
version: 18.3.12
resolution: "@types/react@npm:18.3.12"
dependencies:
Expand All @@ -4657,6 +4666,15 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:^19.0.2":
version: 19.0.2
resolution: "@types/react@npm:19.0.2"
dependencies:
csstype: "npm:^3.0.2"
checksum: 10c0/8992f39701fcf1bf893ef8f94a56196445667baf08fe4f6050a14e229a17aad3265ad3efc01595ff3b4d5d5c69da885f9aa4ff80f164a613018734efcff1eb8f
languageName: node
linkType: hard

"@types/semver@npm:^7.3.12":
version: 7.5.8
resolution: "@types/semver@npm:7.5.8"
Expand Down Expand Up @@ -8260,23 +8278,25 @@ __metadata:
languageName: node
linkType: hard

"framer-motion@npm:^11.11.9":
version: 11.11.9
resolution: "framer-motion@npm:11.11.9"
"framer-motion@npm:^11.15.0":
version: 11.15.0
resolution: "framer-motion@npm:11.15.0"
dependencies:
motion-dom: "npm:^11.14.3"
motion-utils: "npm:^11.14.3"
tslib: "npm:^2.4.0"
peerDependencies:
"@emotion/is-prop-valid": "*"
react: ^18.0.0
react-dom: ^18.0.0
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
"@emotion/is-prop-valid":
optional: true
react:
optional: true
react-dom:
optional: true
checksum: 10c0/70e956da4146ffe00a35bf5abe7fc04bd86dc6fbc8a8ec95b1b125dfaa624db9a1b41d676f0b2eaef88538c58c5616c113d0fbed73219814223669a9002886cc
checksum: 10c0/59f1c1eea09a5cbda346624a7d700bdb1ccff8a8528ed145009db974283064c3a4e55ca9eaaf4950494f254f6233c37634735b9bd8463b25ffeef624030894d6
languageName: node
linkType: hard

Expand Down Expand Up @@ -10542,7 +10562,7 @@ __metadata:
languageName: node
linkType: hard

"lottie-web@npm:^5.1.3":
"lottie-web@npm:^5.12.2":
version: 5.12.2
resolution: "lottie-web@npm:5.12.2"
checksum: 10c0/0aeaf631b10a76afd025df70c2a1486543530708e07a316946c08e55891dac483ffbaf2bf3648ae0b9c54c733118a0a086fd150aa76f7848606214c67ad72c30
Expand Down Expand Up @@ -10951,6 +10971,20 @@ __metadata:
languageName: node
linkType: hard

"motion-dom@npm:^11.14.3":
version: 11.14.3
resolution: "motion-dom@npm:11.14.3"
checksum: 10c0/14989aba2981dcf618dc77d202ac35325366e645fd9e57c6942d88d0696263bbe7d0680da2e5f84e93339a67255bdbfebb8a4994a46584a661dd9a1e136fa7a1
languageName: node
linkType: hard

"motion-utils@npm:^11.14.3":
version: 11.14.3
resolution: "motion-utils@npm:11.14.3"
checksum: 10c0/7459bcb27311b72b416b2618cbfd56bad7d0fbec27736529e3f45a561fa78c43bf82e05338d9d9b765649b57d1c693821e83b30c6ba449d6f7f66c5245f072fb
languageName: node
linkType: hard

"motion@npm:10.16.2":
version: 10.16.2
resolution: "motion@npm:10.16.2"
Expand All @@ -10965,6 +10999,27 @@ __metadata:
languageName: node
linkType: hard

"motion@npm:^11.15.0":
version: 11.15.0
resolution: "motion@npm:11.15.0"
dependencies:
framer-motion: "npm:^11.15.0"
tslib: "npm:^2.4.0"
peerDependencies:
"@emotion/is-prop-valid": "*"
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
"@emotion/is-prop-valid":
optional: true
react:
optional: true
react-dom:
optional: true
checksum: 10c0/fe10db69ad3ca7cb3fd2896d4cd6a79ca8080de16f5fdfcf82a6decd474423f4207b7a924dc7bfb405cffb36d7de0e13780f1a623287be354ced65c78a612c99
languageName: node
linkType: hard

"mri@npm:^1.2.0":
version: 1.2.0
resolution: "mri@npm:1.2.0"
Expand Down Expand Up @@ -11719,9 +11774,9 @@ __metadata:
"@types/lodash": "npm:^4.17.10"
"@types/luxon": "npm:^3.3.7"
"@types/node": "npm:^18.19.4"
"@types/react": "npm:^18.2.46"
"@types/react-dom": "npm:^18.3.1"
"@types/react-lottie": "npm:^1"
"@types/react": "npm:^19.0.2"
"@types/react-dom": "npm:^19.0.2"
"@types/react-lottie": "npm:^1.2.10"
"@types/testing-library__jest-dom": "npm:^6.0.0"
"@typescript-eslint/eslint-plugin": "npm:^7.8.0"
"@typescript-eslint/parser": "npm:^7.8.0"
Expand All @@ -11736,7 +11791,6 @@ __metadata:
eslint-plugin-jest: "npm:^27.6.1"
eslint-plugin-react: "npm:^7.33.2"
eslint-plugin-react-hooks: "npm:^5.0.0"
framer-motion: "npm:^11.11.9"
graphql: "npm:~16.9.0"
graphql-request: "npm:~6.1.0"
husky: "npm:>=6"
Expand All @@ -11746,18 +11800,19 @@ __metadata:
lodash: "npm:^4.17.21"
luxon: "npm:^3.5.0"
match-sorter: "npm:^6.3.1"
motion: "npm:^11.15.0"
postcss: "npm:^8.4.47"
postcss-import: "npm:^16.1.0"
prettier: "npm:^3.3.3"
prettier-plugin-tailwindcss: "npm:^0.6.8"
qrcode.react: "npm:^3.1.0"
react: "npm:^18.3.1"
react: "npm:^19.0.0"
react-daisyui: "npm:^5.0.5"
react-device-detect: "npm:^2.2.3"
react-dom: "npm:^18.3.1"
react-dom: "npm:^19.0.0"
react-error-overlay: "npm:6.0.9"
react-hook-form: "npm:^7.53.0"
react-lottie: "npm:^1.2.4"
react-lottie: "npm:^1.2.10"
react-router-dom: "npm:^6.27.0"
react-toastify: "npm:^9.1.3"
tailwindcss: "npm:^3.4.14"
Expand Down Expand Up @@ -12528,7 +12583,7 @@ __metadata:
languageName: node
linkType: hard

"prop-types@npm:^15.8.1":
"prop-types@npm:^15.6.1, prop-types@npm:^15.8.1":
version: 15.8.1
resolution: "prop-types@npm:15.8.1"
dependencies:
Expand Down Expand Up @@ -12684,7 +12739,7 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:^18.2.0, react-dom@npm:^18.3.1":
"react-dom@npm:^18.2.0":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
dependencies:
Expand All @@ -12696,6 +12751,17 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:^19.0.0":
version: 19.0.0
resolution: "react-dom@npm:19.0.0"
dependencies:
scheduler: "npm:^0.25.0"
peerDependencies:
react: ^19.0.0
checksum: 10c0/a36ce7ab507b237ae2759c984cdaad4af4096d8199fb65b3815c16825e5cfeb7293da790a3fc2184b52bfba7ba3ff31c058c01947aff6fd1a3701632aabaa6a9
languageName: node
linkType: hard

"react-error-overlay@npm:6.0.9":
version: 6.0.9
resolution: "react-error-overlay@npm:6.0.9"
Expand Down Expand Up @@ -12733,15 +12799,16 @@ __metadata:
languageName: node
linkType: hard

"react-lottie@npm:^1.2.4":
version: 1.2.4
resolution: "react-lottie@npm:1.2.4"
"react-lottie@npm:^1.2.10":
version: 1.2.10
resolution: "react-lottie@npm:1.2.10"
dependencies:
babel-runtime: "npm:^6.26.0"
lottie-web: "npm:^5.1.3"
lottie-web: "npm:^5.12.2"
prop-types: "npm:^15.6.1"
peerDependencies:
react: ">=15.0.0"
checksum: 10c0/1a97c11a50a5ef7ca067b55ead45aa69817b4122f277744f98cb9b617a9dea5030b4fcbf0c59240909c3b685b025d538b6f558d54a76ebbd4beafdd0cc03c9d6
checksum: 10c0/f99881d38f7e5d279039f4fdb47d1817e4dd1a62d655e7015e70738c7f39a93d8969a49141044c220493e1374b242612a6e78b05bd5e931914f8e14e5cfd0709
languageName: node
linkType: hard

Expand Down Expand Up @@ -12788,7 +12855,7 @@ __metadata:
languageName: node
linkType: hard

"react@npm:^18.2.0, react@npm:^18.3.1":
"react@npm:^18.2.0":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
Expand All @@ -12797,6 +12864,13 @@ __metadata:
languageName: node
linkType: hard

"react@npm:^19.0.0":
version: 19.0.0
resolution: "react@npm:19.0.0"
checksum: 10c0/9cad8f103e8e3a16d15cb18a0d8115d8bd9f9e1ce3420310aea381eb42aa0a4f812cf047bb5441349257a05fba8a291515691e3cb51267279b2d2c3253f38471
languageName: node
linkType: hard

"read-cache@npm:^1.0.0":
version: 1.0.0
resolution: "read-cache@npm:1.0.0"
Expand Down Expand Up @@ -13329,6 +13403,13 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.25.0":
version: 0.25.0
resolution: "scheduler@npm:0.25.0"
checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe
languageName: node
linkType: hard

"scuid@npm:^1.1.0":
version: 1.1.0
resolution: "scuid@npm:1.1.0"
Expand Down

0 comments on commit a77265e

Please sign in to comment.