Skip to content

Commit

Permalink
fix: manage tokens toggle, closes #5974
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Nov 19, 2024
1 parent e017e56 commit 5c58b40
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ export function CryptoAssetItemToggle({
});
}

function onClick() {
switchRef.current?.click();
}

const toggle = (
<VStack h="100%" justifyContent="center">
<Switch.Root
ref={switchRef}
defaultChecked={isCheckedByDefault}
onCheckedChange={handleSelection}
id={assetId}
onClick={onClick}
>
<Switch.Thumb />
</Switch.Root>
Expand All @@ -58,7 +63,7 @@ export function CryptoAssetItemToggle({

return (
<Box my="space.02">
<Pressable onClick={() => switchRef.current?.click()} data-testid={sanitize(assetId)}>
<Pressable onClick={onClick} data-testid={sanitize(assetId)}>
<ItemLayout
img={icon}
titleLeft={spamFilter(titleLeft)}
Expand Down

0 comments on commit 5c58b40

Please sign in to comment.