Files
new-phone-who-dis/phone/src/apps/notes/hooks/useNoteModal.ts
T

13 lines
340 B
TypeScript

import { useRecoilState } from 'recoil';
import { noteStates } from './state';
interface NoteModalProps {
noteModal: boolean;
setNoteModal: (show: boolean) => void;
}
export const useNoteModal = (): NoteModalProps => {
const [noteModal, setNoteModal] = useRecoilState(noteStates.noteModal);
return { noteModal, setNoteModal };
};