Skip to content

Commit

Permalink
fix(lib): components ts props (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 authored Apr 4, 2024
1 parent b1ac25e commit 18f4672
Show file tree
Hide file tree
Showing 22 changed files with 41 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/components/Molecules/AccountCard/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import QRCode from "react-qr-code";
import { useState } from "react";
import { useToast } from "../../../utils/hooks";
import { AddressAvatar } from "../../Atoms/AddressAvatar/AddressAvatar";
import { AddressAvatar } from "../../Atoms";
import { IconWrapper } from "../../Shared";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { type AccountCardProps } from "@/utils/types/molecules.types";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Molecules/BlockDetails/BlockDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address } from "@/components/Atoms/Address/Address";
import { Address } from "@/components/Atoms";
import { Card, CardDescription, CardTitle } from "@/components/ui/card";
import { Skeleton } from "@/components/ui/skeleton";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Molecules/CollectionCard/CollectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import QRCode from "react-qr-code";
import { useEffect, useState } from "react";
import { useToast } from "../../../utils/hooks";
import { AddressAvatar } from "../../Atoms/AddressAvatar/AddressAvatar";
import { AddressAvatar } from "../../Atoms";
import { IconWrapper } from "../../Shared";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { type CollectionCardProps } from "@/utils/types/molecules.types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import {
type DecodedTransactionProps,
} from "@/utils/types/molecules.types";
import { type Option, None, Some } from "@/utils/option";
import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar";
import { Address, TokenAvatar } from "@/components/Atoms";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { useGoldRush } from "@/utils/store";
import { calculatePrettyBalance, type ChainItem } from "@covalenthq/client-sdk";
import { Card, CardContent } from "@/components/ui/card";
import { Skeleton } from "@/components/ui/skeleton";
import { Address } from "@/components/Atoms/Address/Address";

export const DecodedTransaction: React.FC<DecodedTransactionProps> = ({
chain_name,
Expand Down
8 changes: 5 additions & 3 deletions src/components/Molecules/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { useCallback, useState } from "react";
import { Input } from "@/components/ui/input";
import { useDebounce } from "@/utils/hooks/use-debounce";
import { AddressActivityListView } from "@/components/Organisms/AddressActivityListView/AddressActivityListView";
import {
AddressActivityListView,
AddressDetailsView,
TransactionReceiptView,
} from "@/components/Organisms";
import { ChainSelector } from "../ChainSelector/ChainSelector";
import { useGoldRush } from "@/utils/store";
import { BlockDetails } from "../BlockDetails/BlockDetails";
import { type Chain } from "@covalenthq/client-sdk";
import { TransactionReceiptView } from "@/components/Organisms/TransactionReceiptView/TransactionReceiptView";
import { AddressDetailsView } from "@/components/Organisms/AddressDetailsView/AddressDetailsView";
import { type SEARCH_RESULTS_TYPE } from "@/utils/constants/shared.constants";
import { Button } from "@/components/ui/button";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import {
TableRow,
} from "@/components/ui/table";
import { Checkbox } from "@/components/ui/checkbox";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { AccountCard } from "@/components/Molecules";
import { Skeleton } from "@/components/ui/skeleton";
import { timestampParser } from "@/utils/functions";
import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "@/components/Atoms";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { IconWrapper } from "@/components/Shared";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address } from "@/components/Atoms/Address/Address";
import { Address, TokenAvatar } from "@/components/Atoms";
import { Card, CardContent, CardDescription } from "@/components/ui/card";
import { Skeleton } from "@/components/ui/skeleton";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
Expand All @@ -14,8 +14,7 @@ import {
prettifyCurrency,
} from "@covalenthq/client-sdk";
import { useEffect, useState } from "react";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar";
import { AccountCard, ChainSelector } from "@/components/Molecules";
import {
DropdownMenu,
DropdownMenuContent,
Expand All @@ -25,7 +24,6 @@ import {
} from "@radix-ui/react-dropdown-menu";
import { CaretDownIcon } from "@radix-ui/react-icons";
import { Button } from "@/components/ui/button";
import { ChainSelector } from "@/components/Molecules/ChainSelector/ChainSelector";

export const AddressDetailsView: React.FC<AddressDetailsProps> = ({
address,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { TypographyH1, TypographyH4 } from "@/components/ui/typography";
import { useGoldRush } from "@/utils/store";
import { NFTSalesCount } from "@/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount";
import { NFTFloorPrice } from "@/components/Molecules/NFTs/NFTFloorPrice/NFTFloorPrice";
import { NFTFloorPrice, NFTSalesCount } from "@/components/Molecules";
import { type Option, Some, None } from "@/utils/option";
import { type NFTDetailViewProps } from "@/utils/types/organisms.types";
import { type NftTokenContract } from "@covalenthq/client-sdk";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from "@/components/ui/card";
import { TypographyH3 } from "@/components/ui/typography";
import { Badge } from "@/components/ui/badge";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { AccountCard } from "@/components/Molecules";
import { type NFTWalletCollectionViewProps } from "@/utils/types/organisms.types";
import { Skeleton } from "@/components/ui/skeleton";
import { sum } from "lodash";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
CardTitle,
} from "@/components/ui/card";
import sum from "lodash/sum";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { AccountCard } from "@/components/Molecules";
import { Skeleton } from "@/components/ui/skeleton";
import { useGoldRush } from "@/utils/store";
import { type NFTWalletTokenListViewProps } from "@/utils/types/organisms.types";
import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "@/components/Atoms";

export const NFTWalletTokenListView: React.FC<NFTWalletTokenListViewProps> = ({
chain_names,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import {
TableRow,
} from "@/components/ui/table";
import { Skeleton } from "@/components/ui/skeleton";
import { TokenAvatar } from "../../Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "../../Atoms";
import { Button } from "@/components/ui/button";
import { timestampParser } from "@/utils/functions";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { AccountCard } from "@/components/Molecules";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { sum } from "lodash";
import { BalancePriceDelta, IconWrapper } from "@/components/Shared";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import {
TableRow,
} from "@/components/ui/table";
import { Skeleton } from "@/components/ui/skeleton";
import { TokenAvatar } from "../../Atoms/TokenAvatar/TokenAvatar";
import { AddressAvatar, TokenAvatar } from "../../Atoms";
import {
timestampParser,
truncate,
calculateTimeSeriesGroup,
} from "@/utils/functions";
import { Badge } from "@/components/ui/badge";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { AccountCard } from "@/components/Molecules";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { Button } from "@/components/ui/button";
import {
Expand All @@ -43,7 +43,6 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { AddressAvatar } from "@/components/Atoms/AddressAvatar/AddressAvatar";
import { IconWrapper } from "@/components/Shared";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type TransactionReceiptViewProps } from "@/utils/types/organisms.types";
import { TypographyH4 } from "@/components/ui/typography";
import { Address } from "@/components/Atoms/Address/Address";
import { DecodedTransaction } from "@/components/Molecules/DecodedTransaction/DecodedTransaction";
import { Address } from "@/components/Atoms";
import { AccountCard, DecodedTransaction } from "@/components/Molecules";
import { useMemo, useState } from "react";
import { type Option, None } from "@/utils/option";
import { type DecodedTransactionMetadata } from "@/utils/types/molecules.types";
Expand All @@ -10,7 +10,6 @@ import { CardDescription } from "@/components/ui/card";
import { calculatePrettyBalance, type ChainItem } from "@covalenthq/client-sdk";
import { useGoldRush } from "@/utils/store";
import { ClockIcon } from "@radix-ui/react-icons";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { Skeleton } from "@/components/ui/skeleton";
import { GRK_SIZES } from "@/utils/constants/shared.constants";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { useGoldRush } from "@/utils/store";
import { SkeletonTable } from "@/components/ui/skeletonTable";
import { type TransactionListProps } from "@/utils/types/molecules.types";
import { Address } from "@/components/Atoms/Address/Address";
import { Address } from "@/components/Atoms";
import {
DropdownMenu,
DropdownMenuTrigger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import { type XYKPoolDetailViewProps } from "@/utils/types/organisms.types";
import { useEffect, useState } from "react";
import { Skeleton } from "@/components/ui/skeleton";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { XYKPoolTimeSeries } from "@/components/Molecules/XYK/XYKPoolTimeSeries/XYKPoolTimeSeries";
import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar";
import { XYKPoolInformation, XYKPoolTimeSeries } from "@/components/Molecules";
import { TokenAvatar } from "@/components/Atoms";
import { prettyToken } from "@/utils/functions/pretty-token";
import { XYKPoolInformation } from "@/components/Molecules/XYK/XYKPoolInformation/XYKPoolInformation";
import { type PoolWithTimeseries } from "@covalenthq/client-sdk";

export const XYKPoolDetailView: React.FC<XYKPoolDetailViewProps> = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { TokenAvatar } from "../../../Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "../../../Atoms";
import { Button } from "@/components/ui/button";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { IconWrapper } from "@/components/Shared";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { type XYKTokenDetailViewProps } from "@/utils/types/organisms.types";
import { useEffect, useState } from "react";
import { Skeleton } from "@/components/ui/skeleton";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar";
import { XYKTokenInformation } from "@/components/Molecules/XYK/XYKTokenInformation/XYKTokenInformation";
import { XYKTokenTimeSeries } from "@/components/Molecules/XYK/XYKTokenTimeSeries/XYKTokenTimeSeries";
import { TokenAvatar } from "@/components/Atoms";
import {
XYKTokenInformation,
XYKTokenTimeSeries,
} from "@/components/Molecules";
import { type TokenV2VolumeWithChartData } from "@covalenthq/client-sdk";

export const XYKTokenDetailView: React.FC<XYKTokenDetailViewProps> = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { TokenAvatar } from "../../../Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "../../../Atoms";
import { Button } from "@/components/ui/button";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { BalancePriceDelta, IconWrapper } from "@/components/Shared";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { TokenAvatar } from "../../../Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "../../../Atoms";
import { Button } from "@/components/ui/button";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { IconWrapper } from "@/components/Shared";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { TokenAvatar } from "../../../Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "../../../Atoms";
import { Button } from "@/components/ui/button";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { IconWrapper } from "@/components/Shared";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { TokenAvatar } from "../../../Atoms/TokenAvatar/TokenAvatar";
import { TokenAvatar } from "../../../Atoms";
import { Button } from "@/components/ui/button";
import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting";
import { IconWrapper } from "@/components/Shared";
Expand Down
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import tsConfigPaths from "vite-tsconfig-paths";
// import * as packageJson from "./package.json";

export default defineConfig(() => ({
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
plugins: [react(), tsConfigPaths(), dts()],
build: {
lib: {
Expand Down

0 comments on commit 18f4672

Please sign in to comment.