Skip to content

Commit

Permalink
fix: hide list button when multiple ords selected
Browse files Browse the repository at this point in the history
  • Loading branch information
danwag06 committed Nov 5, 2024
1 parent b20c607 commit 89623c9
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/pages/OrdWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,21 @@ export const OrdWallet = () => {
setPageState('transfer');
}}
/>
<Button
theme={theme}
type="primary"
label="List"
disabled={ordinals.length === 0 || !selectedOrdinals.length}
onClick={async () => {
if (!selectedOrdinals.length) {
addSnackbar('You must select an ordinal to list!', 'info');
return;
}
setPageState('list');
}}
/>
<Show when={selectedOrdinals.length === 1}>
<Button
theme={theme}
type="primary"
label="List"
disabled={ordinals.length === 0 || !selectedOrdinals.length}
onClick={async () => {
if (!selectedOrdinals.length) {
addSnackbar('You must select an ordinal to list!', 'info');
return;
}
setPageState('list');
}}
/>
</Show>
</>
);

Expand Down

0 comments on commit 89623c9

Please sign in to comment.