dify/web/app/components/goto-anything/atoms.ts

14 lines
286 B
TypeScript

'use client'
import { atom, useAtomValue, useSetAtom } from 'jotai'
const gotoAnythingOpenAtom = atom(false)
export function useGotoAnythingOpen() {
return useAtomValue(gotoAnythingOpenAtom)
}
export function useSetGotoAnythingOpen() {
return useSetAtom(gotoAnythingOpenAtom)
}