fix: additional backwards compat

This commit is contained in:
David Nguyen
2025-10-14 15:47:02 +11:00
parent 0eef4cd7e6
commit 304c519c30
13 changed files with 9 additions and 24 deletions

View File

@ -36,7 +36,6 @@ const DOCUMENT_SOURCE_LABELS: { [key in DocumentSource]: MessageDescriptor } = {
DOCUMENT: msg`Document`,
TEMPLATE: msg`Template`,
TEMPLATE_DIRECT_LINK: msg`Direct link`,
NONE: msg`None`,
};
const ZDocumentSearchParamsSchema = ZUrlSearchParamsSchema.extend({

View File

@ -117,17 +117,11 @@ export const TemplatePageViewRecentActivity = ({
className="text-muted-foreground dark:text-muted-foreground/70 flex-auto truncate py-0.5 text-xs leading-5"
>
{match(document.source)
.with(
DocumentSource.DOCUMENT,
DocumentSource.TEMPLATE,
DocumentSource.NONE,
() => (
<Trans>
Document created by{' '}
<span className="font-bold">{document.user.name}</span>
</Trans>
),
)
.with(DocumentSource.DOCUMENT, DocumentSource.TEMPLATE, () => (
<Trans>
Document created by <span className="font-bold">{document.user.name}</span>
</Trans>
))
.with(DocumentSource.TEMPLATE_DIRECT_LINK, () => (
<Trans>
Document created using a <span className="font-bold">direct link</span>