Skip to content

Commit

Permalink
feat: modify dispatch condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Sep 24, 2024
1 parent 867cd31 commit 3051429
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/components/vault/vault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ export function Vault({ vault, variant }: VaultProps): React.JSX.Element {

function handleMainButtonClick() {
if (variant === 'select') {
vault.valueLocked === vault.valueMinted
? dispatch(mintUnmintActions.setUnmintStep([0, vault.uuid]))
: dispatch(mintUnmintActions.setUnmintStep([1, vault.uuid]));
const step = vault.valueLocked === vault.valueMinted ? 0 : 1;
dispatch(mintUnmintActions.setUnmintStep([step, vault.uuid]));
} else {
setIsVaultExpanded(!isVaultExpanded);
}
Expand Down

0 comments on commit 3051429

Please sign in to comment.