[Glitch] fix: Prevent click on content warning banner in notification from opening the post

Port 08597a1819 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion
2025-06-20 11:41:24 +02:00
committed by Claire
parent 68fb65b08d
commit 455df074fe

View File

@@ -8,6 +8,10 @@ export enum BannerVariant {
Filter = 'filter',
}
const stopPropagation: MouseEventHandler = (e) => {
e.stopPropagation();
};
export const StatusBanner: React.FC<{
children: React.ReactNode;
variant: BannerVariant;
@@ -38,6 +42,7 @@ export const StatusBanner: React.FC<{
: 'content-warning content-warning--filter'
}
onClick={forwardClick}
onMouseUp={stopPropagation}
>
<p id={descriptionId}>{children}</p>