mirror of
https://github.com/docmost/docmost.git
synced 2026-05-16 22:41:30 +08:00
feat: favorites (#2103)
* feat: favorites and templates(ee) * rename migrations * fix sidebar * cleanup tabs * fix * turn off templates * cleanup * uuid validation
This commit is contained in:
@@ -26,7 +26,7 @@ function getSnapshot() {
|
||||
return tick;
|
||||
}
|
||||
|
||||
export function useTimeAgo(date: Date | string) {
|
||||
export function useTimeAgo(date: Date | string | undefined) {
|
||||
const currentTick = useSyncExternalStore(subscribe, getSnapshot);
|
||||
return useMemo(() => timeAgo(new Date(date)), [date, currentTick]);
|
||||
return useMemo(() => (date ? timeAgo(new Date(date)) : ""), [date, currentTick]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user