diff --git a/apps/client/src/features/page-history/components/history-diff.module.css b/apps/client/src/features/page-history/components/history-diff.module.css index 389681bf..ebd6105e 100644 --- a/apps/client/src/features/page-history/components/history-diff.module.css +++ b/apps/client/src/features/page-history/components/history-diff.module.css @@ -1,7 +1,3 @@ -.container { - width: 100%; -} - .diffSummary { border: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4)); diff --git a/apps/client/src/features/page-history/components/history-editor.tsx b/apps/client/src/features/page-history/components/history-editor.tsx index 4232c29d..908efa46 100644 --- a/apps/client/src/features/page-history/components/history-editor.tsx +++ b/apps/client/src/features/page-history/components/history-editor.tsx @@ -6,6 +6,8 @@ import { Badge, Divider, Group, Text, Title } from "@mantine/core"; import { Decoration, DecorationSet } from "@tiptap/pm/view"; import { computeHistoryBlockDiff } from "@/features/page-history/utils/history-diff"; import classes from "./history-diff.module.css"; +import historyClasses from "./history.module.css"; + export interface HistoryEditorProps { title: string; @@ -23,7 +25,10 @@ export function HistoryEditor({ editable: false, }); - const [diffCounts, setDiffCounts] = useState<{ added: number; deleted: number }>({ + const [diffCounts, setDiffCounts] = useState<{ + added: number; + deleted: number; + }>({ added: 0, deleted: 0, }); @@ -58,7 +63,10 @@ export function HistoryEditor({ Decoration.node(r.from, r.to, { class: "history-diff-deleted" }), ); - decorationSet = DecorationSet.create(diffDoc, [...decos, ...deletedDecos]); + decorationSet = DecorationSet.create(diffDoc, [ + ...decos, + ...deletedDecos, + ]); } catch { decorationSet = DecorationSet.empty; addedCount = 0; @@ -83,7 +91,7 @@ export function HistoryEditor({ return ( <> -