import format from 'date-fns/format'; import { Typography, styled } from '@toeverything/components/ui'; import { useUserAndSpaces } from '@toeverything/datasource/state'; import { usePageLastUpdated, useWorkspaceAndPageId } from '../util'; export const LastModified = () => { const { user } = useUserAndSpaces(); const username = user ? user.nickname : 'Anonymous'; const { workspaceId, pageId } = useWorkspaceAndPageId(); const lastModified = usePageLastUpdated({ workspaceId, pageId }); const formatLastModified = format(lastModified, 'MM/dd/yyyy hh:mm'); return (