mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
added support for tasks
This commit is contained in:
17
lib/atoms.ts
17
lib/atoms.ts
@@ -19,6 +19,15 @@ import {
|
||||
getCompletionsForToday,
|
||||
getISODate
|
||||
} from "@/lib/utils";
|
||||
import { atomWithStorage } from "jotai/utils";
|
||||
|
||||
export interface BrowserSettings {
|
||||
viewType: ViewType
|
||||
}
|
||||
|
||||
export const browserSettingsAtom = atomWithStorage('browserSettings', {
|
||||
viewType: 'habits'
|
||||
} as BrowserSettings)
|
||||
|
||||
export const settingsAtom = atom(getDefaultSettings());
|
||||
export const habitsAtom = atom(getDefaultHabitsData());
|
||||
@@ -120,11 +129,3 @@ export const pomodoroTodayCompletionsAtom = atom((get) => {
|
||||
timezone: settings.system.timezone
|
||||
})
|
||||
})
|
||||
|
||||
export interface TransientSettings {
|
||||
viewType: ViewType
|
||||
}
|
||||
|
||||
export const transientSettingsAtom = atom<TransientSettings>({
|
||||
viewType: 'habits'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user