Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bob0005 committed Dec 13, 2024
1 parent f51fe06 commit d0c5f72
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions client/src/ui/components/resources/TravelInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { configManager } from "@/dojo/setup";
import { useResourceBalance } from "@/hooks/helpers/useResources";
import { GRAMS_PER_KG } from "@/ui/constants";
import { ResourceIcon } from "@/ui/elements/ResourceIcon";
import { calculateDonkeysNeeded, currencyFormat, divideByPrecision, getTotalResourceWeight, multiplyByPrecision } from "@/ui/utils/utils";
import {
calculateDonkeysNeeded,
currencyFormat,
divideByPrecision,
getTotalResourceWeight,
multiplyByPrecision,
} from "@/ui/utils/utils";
import { CapacityConfigCategory, ResourcesIds, type ID, type Resource } from "@bibliothecadao/eternum";
import { useEffect, useState } from "react";

Expand All @@ -21,7 +27,7 @@ export const TravelInfo = ({
}) => {
const [resourceWeight, setResourceWeight] = useState(0);
const [donkeyBalance, setDonkeyBalance] = useState(0);
const neededDonkeys = calculateDonkeysNeeded(resourceWeight)
const neededDonkeys = calculateDonkeysNeeded(resourceWeight);

const { getBalance } = useResourceBalance();

Expand Down
2 changes: 1 addition & 1 deletion client/src/ui/components/trading/MarketOrderPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -692,4 +692,4 @@ const OrderCreation = ({
</div>
</div>
);
};
};
10 changes: 8 additions & 2 deletions landing/src/components/modules/bridge-out-step-1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ import { Button } from "../ui/button";
import { ResourceIcon } from "../ui/elements/ResourceIcon";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
import { Tooltip, TooltipProvider } from "../ui/tooltip";
import { calculateDonkeysNeeded, divideByPrecision, getSeasonAddresses, getTotalResourceWeight } from "../ui/utils/utils";
import {
calculateDonkeysNeeded,
divideByPrecision,
getSeasonAddresses,
getTotalResourceWeight,
} from "../ui/utils/utils";
import { BridgeFees } from "./bridge-fees";

function formatFee(fee: number) {
Expand Down Expand Up @@ -210,7 +215,8 @@ export const BridgeOutStep1 = () => {
</TooltipProvider>
</div>
<div className="flex items-center gap-2">
{donkeysNeeded} / {divideByPrecision(donkeyBalance.balance)} <ResourceIcon resource={"Donkey"} size="md" />
{donkeysNeeded} / {divideByPrecision(donkeyBalance.balance)}{" "}
<ResourceIcon resource={"Donkey"} size="md" />
</div>
</div>
<BridgeFees
Expand Down

0 comments on commit d0c5f72

Please sign in to comment.