({
children,
value,
}: {
children: ReactNode;
value: CurrentNote;
})
| 8 | const NoteContext = createContext<CurrentNote | undefined>(undefined); |
| 9 | |
| 10 | export function ProvideCurrentNote({ |
| 11 | children, |
| 12 | value, |
| 13 | }: { |
| 14 | children: ReactNode; |
| 15 | value: CurrentNote; |
| 16 | }) { |
| 17 | return <NoteContext.Provider value={value}>{children}</NoteContext.Provider>; |
| 18 | } |
| 19 | |
| 20 | export const useCurrentNote = () => { |
| 21 | const context = useContext(NoteContext); |
nothing calls this directly
no outgoing calls
no test coverage detected