Skip to content

Commit

Permalink
fixed ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp committed May 15, 2024
1 parent 61d3832 commit 8cd4737
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@react-navigation/native-stack": "^6.9.10",
"@sentry/react-native": "~5.20.0",
"@shopify/flash-list": "1.6.3",
"@types/node": "20.11.16",
"@walletconnect/modal-react-native": "^1.0.0-rc.10",
"clsx": "^1.2.1",
"date-fns": "^2.29.3",
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/utils/useIntervalEffectOnAppForeground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export function useIntervalEffectOnAppForeground(callback: () => void) {
let interval: number;

// Set up the interval when the component mounts
interval = setInterval(callback, 10000);
interval = setInterval(callback, 10000) as unknown as number;

const handleAppStateChange = (nextAppState: AppStateStatus) => {
if (nextAppState === 'active') {
// When the app comes into the foreground, trigger the callback
// and kick off the interval
callback();
interval = setInterval(callback, 10000);
interval = setInterval(callback, 10000) as unknown as number;
} else if (nextAppState === 'background' || nextAppState === 'inactive') {
// When the app goes to the background, clear the interval
if (interval) {
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10611,6 +10611,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:20.11.16":
version: 20.11.16
resolution: "@types/node@npm:20.11.16"
dependencies:
undici-types: ~5.26.4
checksum: 51f0831c1219bf4698e7430aeb9892237bd851deeb25ce23c5bb0ceefcc77c3b114e48f4e98d9fc26def5a87ba9d8079f0281dd37bee691140a93f133812c152
languageName: node
linkType: hard

"@types/node@npm:^12.12.54, @types/node@npm:^12.12.6":
version: 12.20.55
resolution: "@types/node@npm:12.20.55"
Expand Down Expand Up @@ -26248,6 +26257,7 @@ __metadata:
"@shopify/flash-list": 1.6.3
"@types/lodash.merge": ^4.6.7
"@types/markdown-it": ^12.2.3
"@types/node": 20.11.16
"@walletconnect/modal-react-native": ^1.0.0-rc.10
babel-plugin-relay: ^14.1.0
babel-plugin-tsconfig-paths-module-resolver: ^1.0.4
Expand Down Expand Up @@ -33359,6 +33369,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~5.26.4":
version: 5.26.5
resolution: "undici-types@npm:5.26.5"
checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487
languageName: node
linkType: hard

"unenv@npm:^1.9.0":
version: 1.9.0
resolution: "unenv@npm:1.9.0"
Expand Down

0 comments on commit 8cd4737

Please sign in to comment.