diff --git a/src/components/Atoms/Address/Address.stories.tsx b/src/components/Atoms/Address/Address.stories.tsx index 77272d57..a92546aa 100644 --- a/src/components/Atoms/Address/Address.stories.tsx +++ b/src/components/Atoms/Address/Address.stories.tsx @@ -1,14 +1,14 @@ import { type Meta, type StoryObj } from "@storybook/react"; -import { AddressView } from "./AddressView"; +import { Address as AddressComponent } from "./Address"; -const meta: Meta = { +const meta: Meta = { title: "Atoms/Address", - component: AddressView, + component: AddressComponent, }; export default meta; -type Story = StoryObj; +type Story = StoryObj; export const Address: Story = { args: { diff --git a/src/components/Atoms/Address/AddressView.tsx b/src/components/Atoms/Address/Address.tsx similarity index 90% rename from src/components/Atoms/Address/AddressView.tsx rename to src/components/Atoms/Address/Address.tsx index 68f2e861..b1c3e1fc 100644 --- a/src/components/Atoms/Address/AddressView.tsx +++ b/src/components/Atoms/Address/Address.tsx @@ -2,7 +2,7 @@ import { copyToClipboard, truncate } from "@/utils/functions"; import { IconWrapper } from "@/components/Shared"; import { type AddressProps } from "@/utils/types/atoms.types"; -export const AddressView: React.FC = ({ address }) => { +export const Address: React.FC = ({ address }) => { return (

{truncate(address)}

diff --git a/src/components/Atoms/AddressAvatar/AddressAvatar.stories.tsx b/src/components/Atoms/AddressAvatar/AddressAvatar.stories.tsx index d05e4e02..c5315a90 100644 --- a/src/components/Atoms/AddressAvatar/AddressAvatar.stories.tsx +++ b/src/components/Atoms/AddressAvatar/AddressAvatar.stories.tsx @@ -1,16 +1,16 @@ import { type Meta, type StoryObj } from "@storybook/react"; -import { AddressAvatarView } from "./AddressAvatarView"; +import { AddressAvatar as AddressAvatarComponent } from "./AddressAvatar"; import { type AddressAvatarProps } from "@/utils/types/atoms.types"; import { GRK_SIZES } from "@/utils/constants/shared.constants"; -const meta: Meta = { +const meta: Meta = { title: "Atoms/Address Avatar", - component: AddressAvatarView, + component: AddressAvatarComponent, }; export default meta; -type Story = StoryObj; +type Story = StoryObj; export const AddressAvatar: Story = { args: { @@ -22,7 +22,7 @@ export const AddressAvatar: Story = { return ( <>
-
- - - - - = ({ +export const AddressAvatar: React.FC = ({ address, type, size, diff --git a/src/components/Atoms/TokenAvatar/TokenAvatar.stories.tsx b/src/components/Atoms/TokenAvatar/TokenAvatar.stories.tsx index c79258d2..dd9c7a4a 100644 --- a/src/components/Atoms/TokenAvatar/TokenAvatar.stories.tsx +++ b/src/components/Atoms/TokenAvatar/TokenAvatar.stories.tsx @@ -1,15 +1,15 @@ import { type Meta, type StoryObj } from "@storybook/react"; import { GRK_SIZES } from "@/utils/constants/shared.constants"; -import { TokenAvatarView } from "./TokenAvatarView"; +import { TokenAvatar as TokenAvatarComponent } from "./TokenAvatar"; -const meta: Meta = { +const meta: Meta = { title: "Atoms/TokenAvatar", - component: TokenAvatarView, + component: TokenAvatarComponent, }; export default meta; -type Story = StoryObj; +type Story = StoryObj; export const TokenAvatar: Story = { args: { @@ -19,36 +19,36 @@ export const TokenAvatar: Story = { return ( <>
-
- - - - -
- - - - = ({ +export const TokenAvatar: React.FC = ({ token_url, sub_url, size, diff --git a/src/components/Molecules/AccountCardView/AccountCardView.stories.tsx b/src/components/Molecules/AccountCard/AccountCard.stories.tsx similarity index 55% rename from src/components/Molecules/AccountCardView/AccountCardView.stories.tsx rename to src/components/Molecules/AccountCard/AccountCard.stories.tsx index 334a66dc..d81fa1f1 100644 --- a/src/components/Molecules/AccountCardView/AccountCardView.stories.tsx +++ b/src/components/Molecules/AccountCard/AccountCard.stories.tsx @@ -1,11 +1,11 @@ import { type Meta, type StoryObj } from "@storybook/react"; -import { AccountCardView } from "./AccountCardView"; +import { AccountCard as AccountCardComponent } from "./AccountCard"; -type Story = StoryObj; +type Story = StoryObj; -const meta: Meta = { +const meta: Meta = { title: "Molecules", - component: AccountCardView, + component: AccountCardComponent, }; export default meta; diff --git a/src/components/Molecules/AccountCardView/AccountCardView.tsx b/src/components/Molecules/AccountCard/AccountCard.tsx similarity index 94% rename from src/components/Molecules/AccountCardView/AccountCardView.tsx rename to src/components/Molecules/AccountCard/AccountCard.tsx index 5a485a34..4a52738b 100644 --- a/src/components/Molecules/AccountCardView/AccountCardView.tsx +++ b/src/components/Molecules/AccountCard/AccountCard.tsx @@ -8,12 +8,12 @@ import { import QRCode from "react-qr-code"; import { useState } from "react"; import { useToast } from "../../../utils/hooks/use-toast"; -import { AddressAvatarView } from "../../Atoms/AddressAvatar/AddressAvatarView"; +import { AddressAvatar } from "../../Atoms/AddressAvatar/AddressAvatar"; import { IconWrapper } from "../../Shared"; import { GRK_SIZES } from "@/utils/constants/shared.constants"; -import { type AccountCardViewProps } from "@/utils/types/molecules.types"; +import { type AccountCardProps } from "@/utils/types/molecules.types"; -export const AccountCardView: React.FC = ({ +export const AccountCard: React.FC = ({ address, type = "effigy", name = "Unnamed Wallet", @@ -34,7 +34,7 @@ export const AccountCardView: React.FC = ({ return ( <>
- ; +type Story = StoryObj; -const meta: Meta = { +const meta: Meta = { title: "Molecules/NFTs", - component: NFTFloorPriceView, + component: NFTFloorPriceComponent, }; export default meta; diff --git a/src/components/Molecules/NFTs/NFTFloorPriceView/NFTFloorPriceView.tsx b/src/components/Molecules/NFTs/NFTFloorPrice/NFTFloorPrice.tsx similarity index 97% rename from src/components/Molecules/NFTs/NFTFloorPriceView/NFTFloorPriceView.tsx rename to src/components/Molecules/NFTs/NFTFloorPrice/NFTFloorPrice.tsx index 147dfb88..f73e22a3 100644 --- a/src/components/Molecules/NFTs/NFTFloorPriceView/NFTFloorPriceView.tsx +++ b/src/components/Molecules/NFTs/NFTFloorPrice/NFTFloorPrice.tsx @@ -16,9 +16,9 @@ import { } from "@/utils/constants/shared.constants"; import { CHART_COLORS } from "@/utils/constants/shared.constants"; import { useCovalent } from "@/utils/store/Covalent"; -import { type NFTFloorPriceViewProps } from "@/utils/types/molecules.types"; +import { type NFTFloorPriceProps } from "@/utils/types/molecules.types"; -export const NFTFloorPriceView: React.FC = ({ +export const NFTFloorPrice: React.FC = ({ chain_name, collection_address, }) => { diff --git a/src/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView.stories.tsx b/src/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount.stories.tsx similarity index 60% rename from src/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView.stories.tsx rename to src/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount.stories.tsx index f7342b53..c68a6689 100644 --- a/src/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView.stories.tsx +++ b/src/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount.stories.tsx @@ -1,12 +1,12 @@ import { type Meta, type StoryObj } from "@storybook/react"; -import { NFTSalesCountView } from "./NFTSalesCountView"; +import { NFTSalesCount as NFTSalesCountComponent } from "./NFTSalesCount"; import { NFT_COLLECTIONS } from "@/utils/constants/shared.constants"; -type Story = StoryObj; +type Story = StoryObj; -const meta: Meta = { +const meta: Meta = { title: "Molecules/NFTs", - component: NFTSalesCountView, + component: NFTSalesCountComponent, }; export default meta; diff --git a/src/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView.tsx b/src/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount.tsx similarity index 96% rename from src/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView.tsx rename to src/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount.tsx index bf95d095..f4ca1a4f 100644 --- a/src/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView.tsx +++ b/src/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount.tsx @@ -8,9 +8,9 @@ import { Skeleton } from "@/components/ui/skeleton"; import { GRK_SIZES, PERIOD } from "@/utils/constants/shared.constants"; import { CHART_COLORS } from "@/utils/constants/shared.constants"; import { useCovalent } from "@/utils/store/Covalent"; -import { type NFTSalesCountViewProps } from "@/utils/types/molecules.types"; +import { type NFTSalesCountProps } from "@/utils/types/molecules.types"; -export const NFTSalesCountView: React.FC = ({ +export const NFTSalesCount: React.FC = ({ chain_name, collection_address, }) => { diff --git a/src/components/Molecules/NFTs/NFTVolumeView/NFTVolumeView.stories.tsx b/src/components/Molecules/NFTs/NFTVolume/NFTVolume.stories.tsx similarity index 88% rename from src/components/Molecules/NFTs/NFTVolumeView/NFTVolumeView.stories.tsx rename to src/components/Molecules/NFTs/NFTVolume/NFTVolume.stories.tsx index 266162db..4b0bcb84 100644 --- a/src/components/Molecules/NFTs/NFTVolumeView/NFTVolumeView.stories.tsx +++ b/src/components/Molecules/NFTs/NFTVolume/NFTVolume.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from "@storybook/react"; -import { NFTVolumeView } from "./NFTVolumeView"; +import { NFTVolume as NFTVolumeView } from "./NFTVolume"; import { NFT_COLLECTIONS } from "@/utils/constants/shared.constants"; type Story = StoryObj; diff --git a/src/components/Molecules/NFTs/NFTVolumeView/NFTVolumeView.tsx b/src/components/Molecules/NFTs/NFTVolume/NFTVolume.tsx similarity index 97% rename from src/components/Molecules/NFTs/NFTVolumeView/NFTVolumeView.tsx rename to src/components/Molecules/NFTs/NFTVolume/NFTVolume.tsx index 73630d67..c6948f00 100644 --- a/src/components/Molecules/NFTs/NFTVolumeView/NFTVolumeView.tsx +++ b/src/components/Molecules/NFTs/NFTVolume/NFTVolume.tsx @@ -12,10 +12,10 @@ import { } from "@/utils/constants/shared.constants"; import { CHART_COLORS } from "@/utils/constants/shared.constants"; import { useCovalent } from "@/utils/store/Covalent"; -import { type NFTVolumeViewProps } from "@/utils/types/molecules.types"; +import { type NFTVolumeProps } from "@/utils/types/molecules.types"; import { prettifyCurrency } from "@covalenthq/client-sdk"; -export const NFTVolumeView: React.FC = ({ +export const NFTVolume: React.FC = ({ chain_name, collection_address, }) => { diff --git a/src/components/Organisms/NFTs/NFTDetailsView/NFTDetailsView.tsx b/src/components/Organisms/NFTs/NFTDetailsView/NFTDetailsView.tsx index 100e85aa..2b8cfe50 100644 --- a/src/components/Organisms/NFTs/NFTDetailsView/NFTDetailsView.tsx +++ b/src/components/Organisms/NFTs/NFTDetailsView/NFTDetailsView.tsx @@ -1,8 +1,8 @@ import { Separator } from "@/components/ui/separator"; import { TypographyH1, TypographyH4 } from "@/components/ui/typography"; import { useCovalent } from "@/utils/store/Covalent"; -import { NFTSalesCountView } from "@/components/Molecules/NFTs/NFTSalesCountView/NFTSalesCountView"; -import { NFTFloorPriceView } from "@/components/Molecules/NFTs/NFTFloorPriceView/NFTFloorPriceView"; +import { NFTSalesCount } from "@/components/Molecules/NFTs/NFTSalesCount/NFTSalesCount"; +import { NFTFloorPrice } from "@/components/Molecules/NFTs/NFTFloorPrice/NFTFloorPrice"; import { type Option, Some, None } from "@/utils/option"; import { type NFTDetailsViewProps } from "@/utils/types/organisms.types"; import { type NftTokenContract } from "@covalenthq/client-sdk"; @@ -74,14 +74,14 @@ export const NFTDetailsView: React.FC = ({
-
-
- +

diff --git a/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx b/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx index 0a2482ed..d761718f 100644 --- a/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx +++ b/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx @@ -14,11 +14,11 @@ import { } from "@/components/ui/card"; import flatMap from "lodash/flatMap"; import sum from "lodash/sum"; -import { AccountCardView } from "@/components/Molecules/AccountCardView/AccountCardView"; +import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard"; import { Skeleton } from "@/components/ui/skeleton"; import { useCovalent } from "@/utils/store/Covalent"; import { type NFTWalletTokenListViewProps } from "@/utils/types/organisms.types"; -import { TokenAvatarView } from "@/components/Atoms/TokenAvatar/TokenAvatarView"; +import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar"; export const NFTWalletTokenListView: React.FC = ({ chain_names, @@ -140,7 +140,7 @@ export const NFTWalletTokenListView: React.FC = ({ borderColor: `${chainColor}`, }} > - = ({ return (
- +

diff --git a/src/components/Organisms/TokenBalances/AddressActivityListView/AddressActivityListView.tsx b/src/components/Organisms/TokenBalances/AddressActivityListView/AddressActivityListView.tsx index c491891b..ca09f20c 100644 --- a/src/components/Organisms/TokenBalances/AddressActivityListView/AddressActivityListView.tsx +++ b/src/components/Organisms/TokenBalances/AddressActivityListView/AddressActivityListView.tsx @@ -18,10 +18,10 @@ import { TableRow, } from "@/components/ui/table"; import { Checkbox } from "@/components/ui/checkbox"; -import { AccountCardView } from "@/components/Molecules/AccountCardView/AccountCardView"; +import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard"; import { Skeleton } from "@/components/ui/skeleton"; import { timestampParser } from "@/utils/functions"; -import { TokenAvatarView } from "@/components/Atoms/TokenAvatar/TokenAvatarView"; +import { TokenAvatar } from "@/components/Atoms/TokenAvatar/TokenAvatar"; import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting"; import { IconWrapper } from "@/components/Shared"; import { GRK_SIZES } from "@/utils/constants/shared.constants"; @@ -122,7 +122,7 @@ export const AddressActivityListView: React.FC< cell: ({ row }) => { return (
-
- +
{" "} diff --git a/src/components/Organisms/TokenBalances/TokenBalancesListView/TokenBalancesListView.tsx b/src/components/Organisms/TokenBalances/TokenBalancesListView/TokenBalancesListView.tsx index dfcdf26a..6a4fed09 100644 --- a/src/components/Organisms/TokenBalances/TokenBalancesListView/TokenBalancesListView.tsx +++ b/src/components/Organisms/TokenBalances/TokenBalancesListView/TokenBalancesListView.tsx @@ -32,11 +32,11 @@ import { } from "@/components/ui/table"; import { Checkbox } from "@/components/ui/checkbox"; import { Skeleton } from "@/components/ui/skeleton"; -import { TokenAvatarView } from "../../../Atoms/TokenAvatar/TokenAvatarView"; +import { TokenAvatar } from "../../../Atoms/TokenAvatar/TokenAvatar"; import { Button } from "@/components/ui/button"; import { timestampParser } from "@/utils/functions"; import { BalancePriceDelta, IconWrapper } from "@/components/Shared"; -import { AccountCardView } from "@/components/Molecules/AccountCardView/AccountCardView"; +import { AccountCardView } from "@/components/Molecules/AccountCardView/AccountCard"; import { TableHeaderSorting } from "@/components/ui/tableHeaderSorting"; import { sum } from "lodash"; import { GRK_SIZES } from "@/utils/constants/shared.constants"; @@ -186,7 +186,7 @@ export const TokenBalancesListView: React.FC = ({ return (
- = ({ return (
- [] = [ cell: ({ row }) => { return (
- [] = [ cell: ({ row }) => { return (
- = ({ ) ?? null; return ( <> - = ({ Some: (result) => { return ( <> -