aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/lib/settings.ts
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-03-13 22:37:41 +0000
committerMohamed Bassem <me@mbassem.com>2024-03-14 16:40:45 +0000
commita03f1dc2ac25579df30e8cb59d2703110c3e564d (patch)
tree59315e73cd83dc391660071c70752cf23989b3da /apps/mobile/lib/settings.ts
parent04572a8e5081b1e4871e273cde9dbaaa44c52fe0 (diff)
downloadkarakeep-a03f1dc2ac25579df30e8cb59d2703110c3e564d.tar.zst
lint: Lint and format the entire repo with the new configs
Diffstat (limited to 'apps/mobile/lib/settings.ts')
-rw-r--r--apps/mobile/lib/settings.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/mobile/lib/settings.ts b/apps/mobile/lib/settings.ts
index 21f40528..13de067e 100644
--- a/apps/mobile/lib/settings.ts
+++ b/apps/mobile/lib/settings.ts
@@ -4,14 +4,15 @@ import { useStorageState } from "./storage-state";
const SETTING_NAME = "settings";
-export type Settings = {
+export interface Settings {
apiKey?: string;
address: string;
-};
+}
export default function useAppSettings() {
- let [[isLoading, settings], setSettings] =
- useStorageState<Settings>(SETTING_NAME);
+ const [settingsState, setSettings] = useStorageState<Settings>(SETTING_NAME);
+ const [isLoading] = settingsState;
+ let [, settings] = settingsState;
settings ||= {
address: "https://demo.hoarder.app",