Skip to content

Commit

Permalink
fix(AuthProvider): remove debounce on refresh()
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Feb 16, 2022
1 parent 4346298 commit 7f423f1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -78,7 +78,6 @@
"jose": "4.3.7",
"jwt-decode": "3.1.2",
"ky": "0.28.7",
"lodash.debounce": "4.0.8",
"next": "12.0.9",
"nodemon": "2.0.15",
"ramda": "0.27.1",
Expand Down
3 changes: 1 addition & 2 deletions src/AuthProvider/index.tsx
@@ -1,7 +1,6 @@
/* eslint-env browser, node */

import ky, { HTTPError } from 'ky'
import debounce from 'lodash.debounce'
import { useRouter } from 'next/router.js'
import React from 'react'

Expand Down Expand Up @@ -265,7 +264,7 @@ const AuthProvider: FunctionComponent<AuthProviderProps> = ({ children, Loader,
return {
logIn,
logOut,
refresh: debounce(refresh, 5000) as AuthContext['refresh'],
refresh,
signUp,
state,
user,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -6490,7 +6490,7 @@ lodash.capitalize@^4.2.1:
resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9"
integrity sha1-+CbJtOKoUR2E46yinbBeGk87cqk=

lodash.debounce@4.0.8, lodash.debounce@^4.0.8:
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
Expand Down

0 comments on commit 7f423f1

Please sign in to comment.