Download client/src/components/Conversations/ToggleContext.ts from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 285 Bytes
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/client/src/components/Conversations/ToggleContext.ts
- Command line
-
hf download hf://spaces/Zhitomir/chat/client/src/components/Conversations/ToggleContext.ts
-
curl -L -o ToggleContext.ts https://huggingface.co/spaces/Zhitomir/chat/resolve/main/client/src/components/Conversations/ToggleContext.ts
285 Bytes
| import { createContext, useContext } from 'react'; | |
| const defaultFunction: (value: boolean) => void = () => ({}); | |
| export const ToggleContext = createContext({ | |
| setPopoverActive: defaultFunction, | |
| isPopoverActive: false, | |
| }); | |
| export const useToggle = () => useContext(ToggleContext); | |