feat: page version history improvements (#1925)

* Refactor: use queue for page history

* feat: save multiple version contributors

* display contributor avatars in history list

* fix interval
This commit is contained in:
Philip Okugbe
2026-02-09 18:25:35 -08:00
committed by GitHub
parent aff8dba2cb
commit 0f02261ee6
15 changed files with 279 additions and 95 deletions
@@ -62,11 +62,18 @@ export default function HistoryModalMobile({ pageId, pageTitle }: Props) {
const selectData = useMemo(
() =>
historyItems.map((item) => ({
value: item.id,
label: formattedDate(new Date(item.createdAt)),
userName: item.lastUpdatedBy?.name,
})),
historyItems.map((item) => {
const contributors = item.contributors;
const hasContributors = contributors && contributors.length > 0;
const names = hasContributors
? contributors.map((c) => c.name).join(", ")
: item.lastUpdatedBy?.name;
return {
value: item.id,
label: formattedDate(new Date(item.createdAt)),
userName: names,
};
}),
[historyItems],
);