Skip to content

Commit

Permalink
wip: bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 committed Apr 8, 2024
1 parent 6a7cb3c commit 1f920c3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"clsx": "^2.1.0",
"cmdk": "^0.2.1",
"dayjs": "^1.11.10",
"lodash": "^4.17.21",
"lucide-react": "^0.335.0",
"react-qr-code": "^2.0.12",
"storybook-dark-mode": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { Badge } from "@/components/ui/badge";
import { AccountCard } from "@/components/Molecules";
import { type NFTWalletCollectionViewProps } from "@/utils/types/organisms.types";
import { Skeleton } from "@/components/ui/skeleton";
import { sum } from "lodash";
import { useGoldRush } from "@/utils/store";

export const NFTWalletCollectionView: React.FC<
Expand Down Expand Up @@ -132,15 +131,16 @@ export const NFTWalletCollectionView: React.FC<
<Skeleton size={GRK_SIZES.MEDIUM} />
),
Some: (result) => {
const s = sum(
result.map(
(x) => x.floor_price_quote
)
let totalFloorPriceQuote: number = 0;
result.forEach(
({ floor_price_quote }) =>
(totalFloorPriceQuote +=
floor_price_quote)
);
return (
<span>
{prettifyCurrency(
s,
totalFloorPriceQuote,
2,
"USD",
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
CardDescription,
CardTitle,
} from "@/components/ui/card";
import sum from "lodash/sum";
import { AccountCard } from "@/components/Molecules";
import { Skeleton } from "@/components/ui/skeleton";
import { useGoldRush } from "@/utils/store";
Expand Down Expand Up @@ -82,13 +81,16 @@ export const NFTWalletTokenListView: React.FC<NFTWalletTokenListViewProps> = ({
<Skeleton size={GRK_SIZES.MEDIUM} />
),
Some: (result) => {
const s = sum(
result.map((x) => x.floor_price_quote)
let totalFloorPriceQuote: number = 0;
result.forEach(
({ floor_price_quote }) =>
(totalFloorPriceQuote +=
floor_price_quote)
);
return (
<span>
{prettifyCurrency(
s,
totalFloorPriceQuote,
2,
"USD",
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import { Button } from "@/components/ui/button";
import { timestampParser } from "@/utils/functions";
import { AccountCard } from "@/components/Molecules";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { sum } from "lodash";
import { BalancePriceDelta, IconWrapper } from "@/components/Shared";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { useGoldRush } from "@/utils/store";
Expand Down Expand Up @@ -320,7 +319,7 @@ export const TokenBalancesListView: React.FC<TokenBalancesListViewProps> = ({
class_name="mr-2"
/>
{row.original.last_transferred_at
? `Last transfered ${timestampParser(
? `Last transferred ${timestampParser(
row.original.last_transferred_at.toDateString(),
"relative"
)} `
Expand Down Expand Up @@ -472,7 +471,7 @@ export const TokenBalancesListView: React.FC<TokenBalancesListViewProps> = ({
class_name="mr-2"
/>
{row.original.last_transferred_at
? `Last transfered ${timestampParser(
? `Last transferred ${timestampParser(
row.original.last_transferred_at.toDateString(),
"relative"
)} `
Expand Down Expand Up @@ -558,11 +557,14 @@ export const TokenBalancesListView: React.FC<TokenBalancesListViewProps> = ({
<Skeleton size={GRK_SIZES.MEDIUM} />
),
Some: (result) => {
const s = sum(result.map((x) => x.quote));
let totalQuote: number = 0;
result.forEach(
({ quote }) => (totalQuote += quote)
);
return (
<span>
{prettifyCurrency(
s,
totalQuote,
2,
"USD",
true
Expand Down

0 comments on commit 1f920c3

Please sign in to comment.