Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const _Note: FC = ({ id }) => {
const [ss, loading, error] = useDocumentOnce(notes.doc(id))
const note = useMemo(() => ss && Note.ss(ss), [ss])
if (loading || error) {
return $(LoadingOrError, { loading, error })()
}
return $(Editor, {
data: note ? (note.data as any) : undefined,
})()
}