Skip to content

Commit

Permalink
fix: only display action btns when uploading a csv
Browse files Browse the repository at this point in the history
  • Loading branch information
UrbanWill committed Sep 11, 2024
1 parent 0e19731 commit 3306cd0
Showing 1 changed file with 28 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,32 +189,34 @@ const AddressBookHeader: React.FC<{
/>
</>
) : (
<div className="flex flex-row gap-[8px]">
<Button
variant="default"
className="h-max px-[12px] py-[10px] text-[16px] w-[145px]"
size="lg"
disabled={isPending}
onClick={() => {
const addressesInput = parsedCsvRows.map(row => {
return { ...row, address: row.address.toSs58(selectedMultisig.chain) }
})
mutate(addressesInput)
}}
>
<div className="flex gap-4 items-center">
<div>Save</div> {isPending && <CircularProgressIndicator size={16} />}
</div>
</Button>
<Button
variant="secondary"
className="h-max px-[12px] py-[10px] text-[16px] w-[145px]"
size="lg"
onClick={handleCsvImportCancel}
>
Cancel
</Button>
</div>
isCsvImport && (
<div className="flex flex-row gap-[8px]">
<Button
variant="default"
className="h-max px-[12px] py-[10px] text-[16px] w-[145px]"
size="lg"
disabled={isPending}
onClick={() => {
const addressesInput = parsedCsvRows.map(row => {
return { ...row, address: row.address.toSs58(selectedMultisig.chain) }
})
mutate(addressesInput)
}}
>
<div className="flex gap-4 items-center">
<div>Save</div> {isPending && <CircularProgressIndicator size={16} />}
</div>
</Button>
<Button
variant="secondary"
className="h-max px-[12px] py-[10px] text-[16px] w-[145px]"
size="lg"
onClick={handleCsvImportCancel}
>
Cancel
</Button>
</div>
)
)}

{!isCsvImport && (
Expand Down

0 comments on commit 3306cd0

Please sign in to comment.