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

fix: making sure that opt in awvt button is hidden in logout state #118

Merged
merged 1 commit into from
Aug 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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