import { ModeStateContext } from "../core/contexts/ModeState" ; import { useContext } from "react" ; category export interface ModeState { mode : "light" | "dark" ; setMode : ( mode : "light" | "dark" ) => void ; toggleMode : ( ) => void ; } see ModeState category export const useModeState = ( ) => useContext ( ModeStateContext ) ;