Files
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

29 lines
806 B
TypeScript

import { ArchiveIcon } from "outline-icons";
import { useTranslation } from "react-i18next";
import type Collection from "~/models/Collection";
import ErrorBoundary from "~/components/ErrorBoundary";
import Notice from "~/components/Notice";
import Time from "~/components/Time";
type Props = {
collection: Collection;
};
export default function Notices({ collection }: Props) {
const { t } = useTranslation();
return (
<ErrorBoundary>
{collection.isArchived && !collection.isDeleted && (
<Notice icon={<ArchiveIcon />}>
{t("Archived by {{userName}}", {
userName: collection.archivedBy?.name ?? t("Unknown"),
})}
&nbsp;
<Time dateTime={collection.archivedAt} addSuffix />
</Notice>
)}
</ErrorBoundary>
);
}