Add deterministic daily weather brief
This commit is contained in:
@@ -12,12 +12,14 @@ interface WeatherStore {
|
||||
selectedStationId: string | null;
|
||||
selectedLocation: SelectedLocation | null;
|
||||
warningNotificationsEnabled: boolean;
|
||||
morningBriefNotificationsEnabled: boolean;
|
||||
warningNotificationProvinceMode: NotificationProvinceMode;
|
||||
warningNotificationProvince: Province | null;
|
||||
toggleFavorite: (id: string) => void;
|
||||
selectStation: (id: string) => void;
|
||||
selectLocation: (location: SelectedLocation) => void;
|
||||
setWarningNotificationsEnabled: (enabled: boolean) => void;
|
||||
setMorningBriefNotificationsEnabled: (enabled: boolean) => void;
|
||||
setWarningNotificationProvinceMode: (mode: NotificationProvinceMode) => void;
|
||||
setWarningNotificationProvince: (province: Province | null) => void;
|
||||
}
|
||||
@@ -29,6 +31,7 @@ export const useWeatherStore = create<WeatherStore>()(
|
||||
selectedStationId: null,
|
||||
selectedLocation: null,
|
||||
warningNotificationsEnabled: false,
|
||||
morningBriefNotificationsEnabled: false,
|
||||
warningNotificationProvinceMode: "selected",
|
||||
warningNotificationProvince: null,
|
||||
toggleFavorite: (id) =>
|
||||
@@ -40,6 +43,7 @@ export const useWeatherStore = create<WeatherStore>()(
|
||||
selectStation: (id) => set({ selectedStationId: id, selectedLocation: null }),
|
||||
selectLocation: (location) => set({ selectedStationId: location.stationId, selectedLocation: location }),
|
||||
setWarningNotificationsEnabled: (enabled) => set({ warningNotificationsEnabled: enabled }),
|
||||
setMorningBriefNotificationsEnabled: (enabled) => set({ morningBriefNotificationsEnabled: enabled }),
|
||||
setWarningNotificationProvinceMode: (mode) => set({ warningNotificationProvinceMode: mode }),
|
||||
setWarningNotificationProvince: (province) => set({ warningNotificationProvince: province }),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user