Skip to content

Commit

Permalink
support switch btc asset change and base currency (#156)
Browse files Browse the repository at this point in the history
* support switch btc asset change and base currency

* safe

* fmt
  • Loading branch information
domechn authored Nov 10, 2023
1 parent 5a8eca0 commit 2fce5d3
Show file tree
Hide file tree
Showing 8 changed files with 382 additions and 236 deletions.
96 changes: 0 additions & 96 deletions src/components/asset-change.tsx

This file was deleted.

17 changes: 7 additions & 10 deletions src/components/overview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import TotalValue from "../total-value";
import AssetChange from "../asset-change";
import LatestAssetsPercentage from "../latest-assets-percentage";
import CoinsAmountAndValueChange from "../coins-amount-and-value-change";
import TopCoinsRank from "../top-coins-rank";
Expand All @@ -13,9 +12,9 @@ import {
LatestAssetsPercentageData,
TopCoinsPercentageChangeData,
TopCoinsRankData,
TotalValueData,
} from "../../middlelayers/types";
import { Separator } from "../ui/separator";
import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";

const App = ({
currency,
Expand All @@ -27,10 +26,7 @@ const App = ({
topCoinsPercentageChangeData,
}: {
currency: CurrencyRateDetail;
totalValueData: {
totalValue: number;
changePercentage: number;
};
totalValueData: TotalValueData;
latestAssetsPercentageData: LatestAssetsPercentageData;
assetChangeData: AssetChangeData;
coinsAmountAndValueChangeData: CoinsAmountAndValueChangeData;
Expand All @@ -40,11 +36,12 @@ const App = ({
return (
<>
<div className="grid gap-4 sm:grid-cols-2 xl:grid-cols-2">
<TotalValue currency={currency} data={totalValueData}>
<AssetChange currency={currency} data={assetChangeData} />
</TotalValue>
<TotalValue
currency={currency}
assetChangeData={assetChangeData}
totalValueData={totalValueData}
></TotalValue>
</div>
{/* <hr className="nice-hr" /> */}
<LatestAssetsPercentage data={latestAssetsPercentageData} />
<Separator className="my-6" />
<CoinsAmountAndValueChange
Expand Down
Loading

0 comments on commit 2fce5d3

Please sign in to comment.