[Glitch] Fix visual glitch with the spoiler button

Port 16baa14ee14b606c60bca74d32bb67c13832f88d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo 2026-07-01 11:10:19 +02:00 committed by Claire
parent 1444b4c821
commit 8d183db8b4

View File

@ -30,7 +30,7 @@ export const SpoilerButton: React.FC<Props> = ({
action = (
<FormattedMessage id='status.media.open' defaultMessage='Click to open' />
);
} else if (matchedFilters) {
} else if (matchedFilters?.length) {
warning = (
<FormattedMessage
id='filter_warning.matches_filter'
@ -80,7 +80,7 @@ export const SpoilerButton: React.FC<Props> = ({
disabled={uncached}
>
<span className='spoiler-button__overlay__label'>
{warning}
<span className='spoiler-button__overlay__text'>{warning}</span>
<span className='spoiler-button__overlay__action'>{action}</span>
</span>
</button>