Skip to content

Commit

Permalink
fix(builddialog): minor bug fix (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattAlgoworld committed Feb 18, 2024
1 parent 404464a commit 04bb54c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/Dialogs/BuildDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const BuildDialog = ({

// object above the selected tile
const object_above =
depositAsset.index - 7 > 6
depositAsset.index - 7 >= 0
? tilesMap[depositAsset.index - 7].object
: `OutOfMapRange`;

Expand Down Expand Up @@ -191,7 +191,8 @@ export const BuildDialog = ({
fontSize={14}
sx={{ pt: 2, color: `warning.main` }}
>
{object_above.includes(`EmpireStateBuilding`)
{object_above.includes(`EmpireStateBuilding2`) ||
object_above.includes(`EmpireStateBuilding3`)
? `Sorry, you can't remove this part of the building. Start removing it starting from its top!`
: `By pressing Deposit, you are going to update the object for tile ${depositAsset.index} by paying ${CurrentCost} AWT.
Please note that it will take up to 2 hours until ARC69 tag of the tile is
Expand Down Expand Up @@ -232,7 +233,8 @@ export const BuildDialog = ({
fontSize={14}
sx={{ pt: 2, fontWeight: `bold`, color: `warning.main` }}
>
{object_above.includes(`EmpireStateBuilding`)
{object_above.includes(`EmpireStateBuilding2`) ||
object_above.includes(`EmpireStateBuilding3`)
? ``
: `Amount you will pay: ${CurrentCost} AWT (available : ${
formatAmount(awtAsset?.amount, awtAsset?.decimals) ?? 0
Expand All @@ -242,7 +244,8 @@ export const BuildDialog = ({
fontSize={14}
sx={{ pt: 2, fontWeight: `bold`, color: `warning.main` }}
>
{object_above.includes(`EmpireStateBuilding`)
{object_above.includes(`EmpireStateBuilding2`) ||
object_above.includes(`EmpireStateBuilding3`)
? ``
: `Transaction fees: 0.01 Algo`}
</Typography>
Expand All @@ -260,7 +263,10 @@ export const BuildDialog = ({
<Button
disabled={
!(
!object_above.includes(`EmpireStateBuilding`) &&
!(
object_above.includes(`EmpireStateBuilding2`) ||
object_above.includes(`EmpireStateBuilding3`)
) &&
(formatAmount(awtAsset?.amount, awtAsset?.decimals) ?? 0) >
CurrentCost &&
selectedobject &&
Expand Down

1 comment on commit 04bb54c

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for algoworld-explorer ready!

✅ Preview
https://algoworld-explorer-2zv8l4ntq-algoworldexplorer.vercel.app

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

Please sign in to comment.