| 1 | import type { SessionMeta } from "../lib/types"; |
| 2 | import { useT } from "../lib/i18n"; |
| 3 | import { ManagementPageShell } from "./ManagementPageShell"; |
| 4 | import { ArchivedSessionsList } from "./ArchivedSessionsList"; |
| 5 | import "./TrashPage.css"; |
| 6 | |
| 7 | export function TrashPage({ active, onBack, list, restore, purge, onOpenSession }: { |
| 8 | onOpenSession: React.ComponentProps<typeof ArchivedSessionsList>["onOpenSession"]; |
| 9 | active: boolean; onBack: () => void; list: () => Promise<SessionMeta[]>; |
| 10 | restore: (path: string) => Promise<void>; purge: (path: string) => Promise<void>; |
| 11 | }) { |
| 12 | const t = useT(); |
| 13 | return <ManagementPageShell active={active} onBack={onBack} className="trash-center" |
| 14 | title={t("history.archivedSection")} description={t("history.archiveExplanation")}> |
| 15 | <ArchivedSessionsList active={active} onOpenSession={onOpenSession} legacyList={list} legacyRestore={restore} legacyPurge={purge} /> |
| 16 | </ManagementPageShell>; |
| 17 | } |
| 18 |