From a03f1dc2ac25579df30e8cb59d2703110c3e564d Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 13 Mar 2024 22:37:41 +0000 Subject: lint: Lint and format the entire repo with the new configs --- apps/mobile/lib/storage-state.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/mobile/lib/storage-state.ts') diff --git a/apps/mobile/lib/storage-state.ts b/apps/mobile/lib/storage-state.ts index 4988f0e0..f45ddfe5 100644 --- a/apps/mobile/lib/storage-state.ts +++ b/apps/mobile/lib/storage-state.ts @@ -1,5 +1,5 @@ -import * as SecureStore from "expo-secure-store"; import * as React from "react"; +import * as SecureStore from "expo-secure-store"; type UseStateHook = [[boolean, T | null], (value: T | null) => void]; @@ -8,7 +8,7 @@ function useAsyncState( ): UseStateHook { return React.useReducer( ( - state: [boolean, T | null], + _state: [boolean, T | null], action: T | null = null, ): [boolean, T | null] => [false, action], initialValue, @@ -34,7 +34,7 @@ export function useStorageState(key: string): UseStateHook { setState(null); return null; } - setState(JSON.parse(value)); + setState(JSON.parse(value) as T); }); }, [key]); -- cgit v1.2.3-70-g09d2