fix: delete comment modal
This commit is contained in:
@@ -63,7 +63,10 @@ export function ReportCommentModal({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-[110] flex items-center justify-center px-4">
|
||||
// pointer-events-auto: the comments drawer is a modal vaul sheet (body
|
||||
// gets pointer-events:none); without this the modal would be click-through
|
||||
// and the click would fall to vaul's overlay and dismiss the drawer.
|
||||
<div className="pointer-events-auto fixed inset-0 z-[110] flex items-center justify-center px-4">
|
||||
<div
|
||||
className="absolute inset-0 bg-foreground/40 backdrop-blur-sm"
|
||||
onClick={() => !working && onClose()}
|
||||
|
||||
@@ -27,6 +27,7 @@ import type { Post } from "@/lib/social";
|
||||
import { displaySourceLabel } from "@/lib/source-reference";
|
||||
import { appendHighlight, hasHighlight } from "@/lib/text-highlight";
|
||||
import { UserAvatar } from "@/components/ui/user-avatar";
|
||||
import { timeAgo } from "@/lib/time";
|
||||
import { PostActionsFooter } from "./post-actions-footer";
|
||||
import { PostCardMenu } from "./post-card-menu";
|
||||
|
||||
@@ -88,11 +89,10 @@ export function PostCard({
|
||||
{authorName}
|
||||
</p>
|
||||
)}
|
||||
{authorHandle ? (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
@{authorHandle}
|
||||
</p>
|
||||
) : null}
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{authorHandle ? <>@{authorHandle} · </> : null}
|
||||
{timeAgo(post.created_at)}
|
||||
</p>
|
||||
</div>
|
||||
<PostCardMenu post={post} onDelete={onDelete} />
|
||||
</header>
|
||||
|
||||
@@ -104,8 +104,12 @@ export function ConfirmModal({
|
||||
|
||||
return createPortal(
|
||||
<>
|
||||
{/* pointer-events-auto: when this modal is opened from inside a modal
|
||||
vaul drawer (body gets pointer-events:none), the overlay/dialog would
|
||||
otherwise be click-through — the click would fall to vaul's overlay
|
||||
beneath and dismiss the drawer instead of hitting these controls. */}
|
||||
<div
|
||||
className="fixed inset-0 z-100 bg-foreground/40 backdrop-blur-sm animate-in fade-in-0"
|
||||
className="pointer-events-auto fixed inset-0 z-100 bg-foreground/40 backdrop-blur-sm animate-in fade-in-0"
|
||||
onClick={() => !working && onClose()}
|
||||
aria-hidden
|
||||
/>
|
||||
@@ -114,7 +118,7 @@ export function ConfirmModal({
|
||||
aria-modal="true"
|
||||
aria-labelledby="confirm-modal-title"
|
||||
aria-describedby={message ? "confirm-modal-message" : undefined}
|
||||
className="fixed left-1/2 top-1/2 z-101 w-full max-w-md -translate-x-1/2 -translate-y-1/2 px-4"
|
||||
className="pointer-events-auto fixed left-1/2 top-1/2 z-101 w-full max-w-md -translate-x-1/2 -translate-y-1/2 px-4"
|
||||
>
|
||||
<div className="rounded-2xl border border-border bg-card shadow-xl overflow-hidden">
|
||||
<div className="flex items-start gap-3 px-5 pt-5">
|
||||
|
||||
Reference in New Issue
Block a user