Rebuild Share and Delete Account from the privacy designs.

Share asks the person who holds the pen to confirm their community agreed before a link turns on, and deleting an account lists each owned Rule with PDF and RULE.md export. Case-study Share copies the page link instead of opening the privacy modal, and the sign-in banner stays below the header so Share remains clickable.
This commit is contained in:
adilallo committed 2026-11-09 19:54:09 -07:00
1 parent 5cbda35e32
commit b6795c1f18
28 files changed
+1467 -377

No files matched your search

@@ -0,0 +1,60 @@
"use client";
/**
* Figma: Overlay / Modal / Delete Account (24985:1959)
* https://www.figma.com/design/agv0VBLiBlcnSAaiAORgPR/Community-Rule-System?node-id=24985-1959
*/
import { memo, useEffect, useId, useRef, useState } from "react";
import { useMessages } from "../../../contexts/MessagesContext";
import { useCreateModalA11y } from "../Create/useCreateModalA11y";
import { DeleteAccountView } from "./DeleteAccount.view";
import type { DeleteAccountProps } from "./DeleteAccount.types";
const DeleteAccountContainer = memo<DeleteAccountProps>((props) => {
const {
isOpen,
onClose,
onConfirm,
busy = false,
rules,
onExportPdf,
onExportMarkdown,
className = "",
backdropVariant = "blurredYellow",
} = props;
const dialogRef = useRef<HTMLDivElement>(null);
const overlayRef = useRef<HTMLDivElement>(null);
const titleId = useId();
const copy = useMessages().modals.deleteAccount;
const [understood, setUnderstood] = useState(false);
useCreateModalA11y(isOpen, busy ? () => undefined : onClose, dialogRef);
useEffect(() => {
if (!isOpen) setUnderstood(false);
}, [isOpen]);
return (
<DeleteAccountView
isOpen={isOpen}
onClose={onClose}
onConfirm={onConfirm}
busy={busy}
rules={rules}
onExportPdf={onExportPdf}
onExportMarkdown={onExportMarkdown}
className={className}
backdropVariant={backdropVariant}
dialogRef={dialogRef}
overlayRef={overlayRef}
titleId={titleId}
copy={copy}
understood={understood}
onUnderstoodChange={setUnderstood}
/>
);
});
DeleteAccountContainer.displayName = "DeleteAccount";
export default DeleteAccountContainer;