fix: update click handler logic in OptionCard

This commit is contained in:
twwu
2025-05-16 17:54:41 +08:00
parent f481075f8f
commit 8d4ced227e
3 changed files with 11 additions and 11 deletions

View File

@ -57,7 +57,7 @@ const OptionCard = <T,>({
disabled && 'cursor-not-allowed opacity-50',
)}
onClick={() => {
if (disabled) return
if (isActive || disabled) return
onClick?.(id)
}}
>
@ -70,7 +70,7 @@ const OptionCard = <T,>({
<div className={cn(
'absolute left-[-2px] top-[-2px] h-14 w-14 rounded-full blur-[80px]',
`${HEADER_EFFECT_MAP[effectColor]}`,
)}/>
)} />
)
}
{