chore(react/collections/table): get table to render

This commit is contained in:
Elian Doran
2025-09-06 18:48:58 +03:00
parent 1cffff77bf
commit f076581bed
12 changed files with 291 additions and 172 deletions

View File

@@ -352,6 +352,15 @@ export function useNoteLabelBoolean(note: FNote | undefined | null, labelName: s
return [ labelValue, setter ] as const;
}
export function useNoteLabelInt(note: FNote | undefined | null, labelName: string): [ number | undefined, (newValue: number) => void] {
const [ value, setValue ] = useNoteLabel(note, labelName);
useDebugValue(labelName);
return [
(value ? parseInt(value, 10) : undefined),
(newValue) => setValue(String(newValue))
]
}
export function useNoteBlob(note: FNote | null | undefined): [ FBlob | null | undefined ] {
const [ blob, setBlob ] = useState<FBlob | null>();