Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ build/
*.tsbuildinfo

.claude/
.playwright-mcp/
.codex/
.workspaces/

# NCMEC report XML files (contain sensitive data)
ncmec-reports/
Expand Down
53 changes: 27 additions & 26 deletions client/src/webpages/dashboard/components/CoopModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LeftOutlined } from '@ant-design/icons';
import { Modal as AntModal } from 'antd';
import { ArrowLeft } from 'lucide-react';

import { Dialog, DialogContent } from '@/coop-ui/Dialog';
import CloseButton from '@/components/common/CloseButton';

import CoopModalFooter, { CoopModalFooterButtonProps } from './CoopModalFooter';
Expand Down Expand Up @@ -35,40 +35,41 @@ export default function CoopModal({
onClick={onBack}
className="flex flex-row items-center justify-center rounded-full cursor-pointer text-slate-400 hover:text-primary/70"
>
<LeftOutlined className="text-base leading-none" onClick={onBack} />
<ArrowLeft className="h-4 w-4" />
{!title && (
// pb-0.5 is to add a little padding so the text appears in the middle of the line, rather
// than having it pinned to the bottom
<div className="font-medium text-start ml-2 text-sm pb-0.5">Back</div>
)}
</div>
);

return (
<AntModal
className={`p-8 rounded-lg max-w-5xl ${className ?? ''}`}
centered
width="auto"
<Dialog
open={visible}
onCancel={onClose}
footer={null}
closable={false}
onOpenChange={(open) => {
if (!open && onClose) {
onClose({} as React.MouseEvent<HTMLElement>);
}
}}
>
<div className="flex flex-row min-w-[24rem] justify-between items-start pb-6">
<div className="flex flex-row items-center justify-start">
{showBack && backButton}
{title && (
<div className="mr-12 text-2xl font-bold text-start">{title}</div>
<DialogContent
className={`p-8 rounded-lg max-w-5xl ${className ?? ''}`}
>
<div className="flex flex-row min-w-[24rem] justify-between items-start pb-6">
<div className="flex flex-row items-center justify-start">
{showBack && backButton}
{title && (
<div className="mr-12 text-2xl font-bold text-start">{title}</div>
)}
</div>
{hideCloseButton || !onClose ? null : (
<div className="flex flex-col items-center justify-center h-full pb-0">
<CloseButton onClose={onClose} customWidth="w-5" />
</div>
)}
</div>
{hideCloseButton || !onClose ? null : (
<div className="flex flex-col items-center justify-center h-full pb-0">
<CloseButton onClose={onClose} customWidth="w-5" />
</div>
)}
</div>
{children}
{footer && <CoopModalFooter buttons={footer} />}
</AntModal>
{children}
{footer && <CoopModalFooter buttons={footer} />}
</DialogContent>
</Dialog>
);
}
Loading