Skip to content

Commit

Permalink
Feature/update dependency use query params to v2.x (#338)
Browse files Browse the repository at this point in the history
* Update dependency "use-query-params" to v2.x

Update to 2.2.1

* Update dependency "use-query-params" to v2.x - Fix provider

Update to 2.2.1
  • Loading branch information
schroda authored Jun 4, 2023
1 parent ce02802 commit 6b05083
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"react-scripts": "^5.0.1",
"react-virtuoso": "^1.8.6",
"swr": "^2.1.5",
"use-query-params": "^1.2.3",
"use-query-params": "^2.2.1",
"web-vitals": "^2.1.0"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/context/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import { StyledEngineProvider, ThemeProvider } from '@mui/material/styles';
import LibraryOptionsContextProvider from 'components/library/LibraryOptionsProvider';
import NavBarContextProvider from 'components/navbar/NavBarContextProvider';
import React, { useMemo } from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import { SWRConfig } from 'swr';
import createTheme from 'theme';
import { QueryParamProvider } from 'use-query-params';
import useLocalStorage from 'util/useLocalStorage';
import DarkTheme from 'components/context/DarkTheme';
import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5';

interface Props {
children: React.ReactNode;
Expand All @@ -40,7 +41,7 @@ const AppContext: React.FC<Props> = ({ children }) => {
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}>
<DarkTheme.Provider value={darkThemeContext}>
<QueryParamProvider ReactRouterRoute={Route}>
<QueryParamProvider adapter={ReactRouter5Adapter}>
<LibraryOptionsContextProvider>
<NavBarContextProvider>{children}</NavBarContextProvider>
</LibraryOptionsContextProvider>
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9697,10 +9697,10 @@ serialize-javascript@^6.0.0:
dependencies:
randombytes "^2.1.0"

serialize-query-params@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/serialize-query-params/-/serialize-query-params-1.3.5.tgz#ca6a6419219ead24cf3b55d7b4d6a4b716b70359"
integrity sha512-BrLH1RqgzVxm6dco+KP9S6BodeFiUVvKwtY3GSWQlupIdblT19KCGTRkHZ2yIU6Bjy0Prjts0tYe11VpTMbAeQ==
serialize-query-params@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/serialize-query-params/-/serialize-query-params-2.0.2.tgz#598a3fb9e13f4ea1c1992fbd20231aa16b31db81"
integrity sha512-1chMo1dST4pFA9RDXAtF0Rbjaut4is7bzFbI1Z26IuMub68pNCILku85aYmeFhvnY//BXUPUhoRMjYcsT93J/Q==

serve-index@^1.9.1:
version "1.9.1"
Expand Down Expand Up @@ -10552,12 +10552,12 @@ use-memo-one@^1.1.1:
resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.2.tgz#0c8203a329f76e040047a35a1197defe342fab20"
integrity sha512-u2qFKtxLsia/r8qG0ZKkbytbztzRb317XCkT7yP8wxL0tZ/CzK2G+WWie5vWvpyeP7+YoPIwbJoIHJ4Ba4k0oQ==

use-query-params@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/use-query-params/-/use-query-params-1.2.3.tgz#306c31a0cbc714e8a3b4bd7e91a6a9aaccaa5e22"
integrity sha512-cdG0tgbzK+FzsV6DAt2CN8Saa3WpRnze7uC4Rdh7l15epSFq7egmcB/zuREvPNwO5Yk80nUpDZpiyHsoq50d8w==
use-query-params@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/use-query-params/-/use-query-params-2.2.1.tgz#c558ab70706f319112fbccabf6867b9f904e947d"
integrity sha512-i6alcyLB8w9i3ZK3caNftdb+UnbfBRNPDnc89CNQWkGRmDrm/gfydHvMBfVsQJRq3NoHOM2dt/ceBWG2397v1Q==
dependencies:
serialize-query-params "^1.3.5"
serialize-query-params "^2.0.2"

use-sync-external-store@^1.2.0:
version "1.2.0"
Expand Down

0 comments on commit 6b05083

Please sign in to comment.