Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
fix: making sure that opt in awvt button is hidden in logout state (#118
Browse files Browse the repository at this point in the history
)
  • Loading branch information
aorumbayev authored Aug 25, 2022
1 parent 0d2a7c4 commit f3df27b
Showing 1 changed file with 39 additions and 37 deletions.
76 changes: 39 additions & 37 deletions src/pages/swaps/my-swaps.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,43 +89,45 @@ export default function MySwaps() {
title="📜 My Swaps"
description="Activate, update or deactivate your existing swaps"
>
<Grid
sx={{ pt: 2 }}
container
justifyContent="space-evenly"
alignItems="center"
>
{hasAwvt ? (
<Button
variant="outlined"
onClick={async () => {
await dispatch(
optAssets({
assetIndexes: awvtIndex,
connector,
deOptIn: true,
}),
);
}}
>
Opt out visibility token
</Button>
) : (
<Button
variant="outlined"
onClick={async () => {
await dispatch(
optAssets({
assetIndexes: awvtIndex,
connector,
}),
);
}}
>
Opt in visibility token
</Button>
)}
</Grid>
{address && (
<Grid
sx={{ pt: 2 }}
container
justifyContent="space-evenly"
alignItems="center"
>
{hasAwvt ? (
<Button
variant="outlined"
onClick={async () => {
await dispatch(
optAssets({
assetIndexes: awvtIndex,
connector,
deOptIn: true,
}),
);
}}
>
Opt out visibility token
</Button>
) : (
<Button
variant="outlined"
onClick={async () => {
await dispatch(
optAssets({
assetIndexes: awvtIndex,
connector,
}),
);
}}
>
Opt in visibility token
</Button>
)}
</Grid>
)}
</PageHeader>

<Container
Expand Down

1 comment on commit f3df27b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for algoworld-swapper ready!

✅ Preview
https://algoworld-swapper-ligu9rik2-algoworldexplorer.vercel.app

Built with commit f3df27b.
This pull request is being automatically deployed with vercel-action

Please # to comment.