Skip to content

Commit

Permalink
chore: rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 committed Dec 5, 2023
1 parent 5390f9c commit 41a3005
Show file tree
Hide file tree
Showing 21 changed files with 83 additions and 83 deletions.
8 changes: 4 additions & 4 deletions src/components/Atoms/Address/Address.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof AddressView> = {
const meta: Meta<typeof AddressComponent> = {
title: "Atoms/Address",
component: AddressView,
component: AddressComponent,
};

export default meta;

type Story = StoryObj<typeof AddressView>;
type Story = StoryObj<typeof AddressComponent>;

export const Address: Story = {
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AddressProps> = ({ address }) => {
export const Address: React.FC<AddressProps> = ({ address }) => {
return (
<div className="flex items-center gap-x-2">
<p>{truncate(address)}</p>
Expand Down
20 changes: 10 additions & 10 deletions src/components/Atoms/AddressAvatar/AddressAvatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof AddressAvatarView> = {
const meta: Meta<typeof AddressAvatarComponent> = {
title: "Atoms/Address Avatar",
component: AddressAvatarView,
component: AddressAvatarComponent,
};

export default meta;

type Story = StoryObj<typeof AddressAvatarView>;
type Story = StoryObj<typeof AddressAvatarComponent>;

export const AddressAvatar: Story = {
args: {
Expand All @@ -22,7 +22,7 @@ export const AddressAvatar: Story = {
return (
<>
<div className="m-1">
<AddressAvatarView
<AddressAvatarComponent
address={address}
size={size}
type={type}
Expand All @@ -31,27 +31,27 @@ export const AddressAvatar: Story = {
</div>

<div className="m-1 mt-20 flex gap-1">
<AddressAvatarView
<AddressAvatarComponent
address={address}
size={GRK_SIZES.LARGE}
type={"effigy"}
/>
<AddressAvatarView
<AddressAvatarComponent
address={address}
size={GRK_SIZES.MEDIUM}
type={"wallet"}
/>
<AddressAvatarView
<AddressAvatarComponent
address={address}
size={GRK_SIZES.SMALL}
type={"effigy"}
/>
<AddressAvatarView
<AddressAvatarComponent
address={address}
size={GRK_SIZES.EXTRA_SMALL}
type={"fingerprint"}
/>
<AddressAvatarView
<AddressAvatarComponent
address={address}
size={GRK_SIZES.EXTRA_EXTRA_SMALL}
type={"wallet"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
import { type AddressAvatarProps } from "@/utils/types/atoms.types";
import { useMemo } from "react";

export const AddressAvatarView: React.FC<AddressAvatarProps> = ({
export const AddressAvatar: React.FC<AddressAvatarProps> = ({
address,
type,
size,
Expand Down
28 changes: 14 additions & 14 deletions src/components/Atoms/TokenAvatar/TokenAvatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof TokenAvatarView> = {
const meta: Meta<typeof TokenAvatarComponent> = {
title: "Atoms/TokenAvatar",
component: TokenAvatarView,
component: TokenAvatarComponent,
};

export default meta;

type Story = StoryObj<typeof TokenAvatarView>;
type Story = StoryObj<typeof TokenAvatarComponent>;

export const TokenAvatar: Story = {
args: {
Expand All @@ -19,60 +19,60 @@ export const TokenAvatar: Story = {
return (
<>
<div className="m-1">
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.MEDIUM}
/>
</div>
<div className="m-1 mt-20 flex gap-1">
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.EXTRA_EXTRA_SMALL}
/>

<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.EXTRA_SMALL}
/>
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.SMALL}
/>
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.MEDIUM}
/>
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.LARGE}
/>
</div>
<div className="m-1 mt-20 flex gap-3">
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.EXTRA_SMALL}
chain_color={"grey"}
sub_url={
"https://www.datocms-assets.com/86369/1699425239-uniswap.jpg"
}
/>
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.SMALL}
chain_color={"grey"}
sub_url={
"https://www.datocms-assets.com/86369/1699425239-uniswap.jpg"
}
/>
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.MEDIUM}
chain_color={"grey"}
sub_url={
"https://www.datocms-assets.com/86369/1699425239-uniswap.jpg"
}
/>
<TokenAvatarView
<TokenAvatarComponent
token_url="https://logos.covalenthq.com/tokens/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png"
size={GRK_SIZES.LARGE}
chain_color={"grey"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef } from "react";
import { type TokenAvatarProps } from "@/utils/types/atoms.types";
import { GRK_SIZES } from "@/utils/constants/shared.constants";

export const TokenAvatarView: React.FC<TokenAvatarProps> = ({
export const TokenAvatar: React.FC<TokenAvatarProps> = ({
token_url,
sub_url,
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -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<typeof AccountCardView>;
type Story = StoryObj<typeof AccountCardComponent>;

const meta: Meta<typeof AccountCardView> = {
const meta: Meta<typeof AccountCardComponent> = {
title: "Molecules",
component: AccountCardView,
component: AccountCardComponent,
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountCardViewProps> = ({
export const AccountCard: React.FC<AccountCardProps> = ({
address,
type = "effigy",
name = "Unnamed Wallet",
Expand All @@ -34,7 +34,7 @@ export const AccountCardView: React.FC<AccountCardViewProps> = ({
return (
<>
<div className="flex w-full items-center gap-x-4 rounded border p-2 md:max-w-[18rem] lg:max-w-[18rem]">
<AddressAvatarView
<AddressAvatar
type={type}
address={address}
rounded
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { type Meta, type StoryObj } from "@storybook/react";
import { NFTFloorPriceView } from "./NFTFloorPriceView";
import { NFTFloorPrice as NFTFloorPriceComponent } from "./NFTFloorPrice";
import { NFT_COLLECTIONS } from "@/utils/constants/shared.constants";

type Story = StoryObj<typeof NFTFloorPriceView>;
type Story = StoryObj<typeof NFTFloorPriceComponent>;

const meta: Meta<typeof NFTFloorPriceView> = {
const meta: Meta<typeof NFTFloorPriceComponent> = {
title: "Molecules/NFTs",
component: NFTFloorPriceView,
component: NFTFloorPriceComponent,
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NFTFloorPriceViewProps> = ({
export const NFTFloorPrice: React.FC<NFTFloorPriceProps> = ({
chain_name,
collection_address,
}) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<typeof NFTSalesCountView>;
type Story = StoryObj<typeof NFTSalesCountComponent>;

const meta: Meta<typeof NFTSalesCountView> = {
const meta: Meta<typeof NFTSalesCountComponent> = {
title: "Molecules/NFTs",
component: NFTSalesCountView,
component: NFTSalesCountComponent,
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NFTSalesCountViewProps> = ({
export const NFTSalesCount: React.FC<NFTSalesCountProps> = ({
chain_name,
collection_address,
}) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<typeof NFTVolumeView>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NFTVolumeViewProps> = ({
export const NFTVolume: React.FC<NFTVolumeProps> = ({
chain_name,
collection_address,
}) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -74,14 +74,14 @@ export const NFTDetailsView: React.FC<NFTDetailsViewProps> = ({

<div className="mt-4 flex place-content-between space-x-4">
<div className=" w-[50%]">
<NFTSalesCountView
<NFTSalesCount
chain_name={chain_name}
collection_address={collection_address}
token_id={token_id}
/>
</div>
<div className=" w-[50%]">
<NFTFloorPriceView
<NFTFloorPrice
chain_name={chain_name}
collection_address={collection_address}
token_id={token_id}
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 { AccountCardView } from "@/components/Molecules/AccountCardView/AccountCardView";
import { AccountCard } from "@/components/Molecules/AccountCard/AccountCard";
import { type NFTWalletCollectionViewProps } from "@/utils/types/organisms.types";
import { Skeleton } from "@/components/ui/skeleton";
import { sum } from "lodash";
Expand Down Expand Up @@ -119,7 +119,7 @@ export const NFTWalletCollectionView: React.FC<
return (
<div className="space-y-4 ">
<div className="flex flex-wrap place-content-between gap-2">
<AccountCardView address={address} />
<AccountCard address={address} />

<div className="w-full rounded border p-2 md:w-min lg:w-min">
<h2 className="text-base font-semibold text-secondary ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NFTWalletTokenListViewProps> = ({
chain_names,
Expand Down Expand Up @@ -140,7 +140,7 @@ export const NFTWalletTokenListView: React.FC<NFTWalletTokenListViewProps> = ({
borderColor: `${chainColor}`,
}}
>
<TokenAvatarView
<TokenAvatar
is_chain_logo
size={GRK_SIZES.EXTRA_SMALL}
chain_color={chainColor}
Expand Down Expand Up @@ -181,7 +181,7 @@ export const NFTWalletTokenListView: React.FC<NFTWalletTokenListViewProps> = ({
return (
<div className="space-y-4 ">
<div className="flex flex-wrap place-content-between gap-2 ">
<AccountCardView address={address} />
<AccountCard address={address} />

<div className="w-full rounded border p-2 md:max-w-[15rem] lg:max-w-[15rem]">
<h2 className="text-md text-secondary ">
Expand Down
Loading

0 comments on commit 41a3005

Please sign in to comment.