Added Calendar viewer and Environment overview with AI, Health overviewer

This commit is contained in:
2025-11-29 00:05:41 +01:00
parent 8c699bd121
commit ab72c01999
33 changed files with 4436 additions and 383 deletions

View File

@@ -0,0 +1,40 @@
import { createContext, useContext, useState, ReactNode } from 'react'
interface WellnessState {
healthDeviceId: string | null
city: string
setHealthDeviceId: (id: string | null) => void
setCity: (city: string) => void
}
const WellnessStateContext = createContext<WellnessState | undefined>(undefined)
export function WellnessStateProvider({ children }: { children: ReactNode }) {
const [healthDeviceId, setHealthDeviceId] = useState<string | null>(null)
const [city, setCity] = useState<string>('Skopje')
return (
<WellnessStateContext.Provider
value={{
healthDeviceId,
city,
setHealthDeviceId,
setCity,
}}
>
{children}
</WellnessStateContext.Provider>
)
}
export function useWellnessState() {
const context = useContext(WellnessStateContext)
if (context === undefined) {
throw new Error('useWellnessState must be used within WellnessStateProvider')
}
return context
}