mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
9 lines
259 B
TypeScript
9 lines
259 B
TypeScript
|
|
import { createContext, useContext } from 'react';
|
||
|
|
|
||
|
|
const defaultFunction: (value: boolean) => void = () => ({});
|
||
|
|
export const ToggleContext = createContext({
|
||
|
|
setPopoverActive: defaultFunction,
|
||
|
|
});
|
||
|
|
|
||
|
|
export const useToggle = () => useContext(ToggleContext);
|