From 58785ba9a872373868bc8ce14f00431606e98fa6 Mon Sep 17 00:00:00 2001 From: Jacob Homanics Date: Sat, 6 Apr 2024 00:56:30 -0500 Subject: [PATCH] moved cards to deprecation, organized reputation components --- .../_components/RepTokensDemo.tsx | 20 ++++----- packages/nextjs/components/Header.tsx | 4 +- .../ReputationTokenCard.tsx | 4 +- .../ReputationTokenGroupCard.tsx | 2 +- .../BalanceImageOverlay.tsx | 2 +- .../StylizedAddressCard.tsx | 0 .../StylizedBalanceCard.tsx | 0 .../StylizedImageCard.tsx | 2 +- .../StylizedStringCard.tsx | 0 .../deprecated}/Stylized.ts | 0 .../deprecated/StylizedTokenCard.tsx | 2 +- .../deprecated/StylizedTokenCard2.tsx | 0 .../deprecated/StylizedTokenGroupCard2.tsx | 0 .../deprecated/StylizedTokenGroupCard3.tsx | 0 .../token-properties/AddressCard.tsx | 2 +- .../token-properties/BalanceCard.tsx | 2 +- .../token-properties/DescriptionCard.tsx | 2 +- .../token-properties/ImageCard.tsx | 2 +- .../MaxMintAmountPerTxCard.tsx | 2 +- .../token-properties/NameCard.tsx | 2 +- .../token-properties/TokenTypeCard.tsx | 2 +- .../components/rep-tokens/types/Types.tsx | 41 ------------------- 22 files changed, 25 insertions(+), 66 deletions(-) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/ReputationTokenCard.tsx (96%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/ReputationTokenGroupCard.tsx (96%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/BalanceImageOverlay.tsx (92%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/StylizedAddressCard.tsx (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/StylizedBalanceCard.tsx (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/StylizedImageCard.tsx (94%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/StylizedStringCard.tsx (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal/deprecated}/Stylized.ts (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/deprecated/StylizedTokenCard.tsx (97%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/deprecated/StylizedTokenCard2.tsx (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/deprecated/StylizedTokenGroupCard2.tsx (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => internal}/deprecated/StylizedTokenGroupCard3.tsx (100%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/AddressCard.tsx (78%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/BalanceCard.tsx (85%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/DescriptionCard.tsx (83%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/ImageCard.tsx (79%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/MaxMintAmountPerTxCard.tsx (87%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/NameCard.tsx (81%) rename packages/nextjs/components/rep-tokens/cards/{stylized-cards => }/token-properties/TokenTypeCard.tsx (92%) delete mode 100644 packages/nextjs/components/rep-tokens/types/Types.tsx diff --git a/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx b/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx index 1f7127b..35791b3 100644 --- a/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx +++ b/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx @@ -3,16 +3,16 @@ import { Tab, TabList, TabPanel, Tabs } from "react-tabs"; import "react-tabs/style/react-tabs.css"; import { useAccount } from "wagmi"; -import { ReputationTokenCard } from "~~/components/rep-tokens/cards/stylized-cards/ReputationTokenCard"; -import { ReputationTokenGroupCard } from "~~/components/rep-tokens/cards/stylized-cards/ReputationTokenGroupCard"; -import { StylizedAddressCard } from "~~/components/rep-tokens/cards/stylized-cards/StylizedAddressCard"; -import { AddressCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/AddressCard"; -import { BalanceCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/BalanceCard"; -import { DescriptionCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/DescriptionCard"; -import { ImageCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/ImageCard"; -import { MaxMintAmountPerTxCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/MaxMintAmountPerTxCard"; -import { NameCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/NameCard"; -import { TokenTypeCard } from "~~/components/rep-tokens/cards/stylized-cards/token-properties/TokenTypeCard"; +import { ReputationTokenCard } from "~~/components/rep-tokens/cards/ReputationTokenCard"; +import { ReputationTokenGroupCard } from "~~/components/rep-tokens/cards/ReputationTokenGroupCard"; +import { StylizedAddressCard } from "~~/components/rep-tokens/cards/internal/StylizedAddressCard"; +import { AddressCard } from "~~/components/rep-tokens/cards/token-properties/AddressCard"; +import { BalanceCard } from "~~/components/rep-tokens/cards/token-properties/BalanceCard"; +import { DescriptionCard } from "~~/components/rep-tokens/cards/token-properties/DescriptionCard"; +import { ImageCard } from "~~/components/rep-tokens/cards/token-properties/ImageCard"; +import { MaxMintAmountPerTxCard } from "~~/components/rep-tokens/cards/token-properties/MaxMintAmountPerTxCard"; +import { NameCard } from "~~/components/rep-tokens/cards/token-properties/NameCard"; +import { TokenTypeCard } from "~~/components/rep-tokens/cards/token-properties/TokenTypeCard"; import { useGetRepToken, useRepTokens } from "~~/components/rep-tokens/hooks/Hooks"; import { useScaffoldContract, useScaffoldContractWrite } from "~~/hooks/scaffold-eth"; diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index d66ade9..ea829a7 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -4,8 +4,8 @@ import React, { useCallback, useRef, useState } from "react"; import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { ReputationTokenGroupCard } from "./rep-tokens/cards/stylized-cards/ReputationTokenGroupCard"; -import { ReputationComponent } from "./rep-tokens/cards/stylized-cards/ReputationTokenGroupCard"; +import { ReputationTokenGroupCard } from "./rep-tokens/cards/ReputationTokenGroupCard"; +import { ReputationComponent } from "./rep-tokens/cards/ReputationTokenGroupCard"; import { useRepTokens } from "./rep-tokens/hooks/Hooks"; import { useAccount } from "wagmi"; import { Bars3Icon, BugAntIcon } from "@heroicons/react/24/outline"; diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/ReputationTokenCard.tsx b/packages/nextjs/components/rep-tokens/cards/ReputationTokenCard.tsx similarity index 96% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/ReputationTokenCard.tsx rename to packages/nextjs/components/rep-tokens/cards/ReputationTokenCard.tsx index dea0f1f..2e05c41 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/ReputationTokenCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/ReputationTokenCard.tsx @@ -1,6 +1,6 @@ -import { Token } from "../../hooks/Hooks"; -import { BalanceImageOverlay } from "./BalanceImageOverlay"; +import { Token } from "../hooks/Hooks"; import { ReputationComponent } from "./ReputationTokenGroupCard"; +import { BalanceImageOverlay } from "./internal/BalanceImageOverlay"; import { AddressCard } from "./token-properties/AddressCard"; import { BalanceCard } from "./token-properties/BalanceCard"; import { DescriptionCard } from "./token-properties/DescriptionCard"; diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/ReputationTokenGroupCard.tsx b/packages/nextjs/components/rep-tokens/cards/ReputationTokenGroupCard.tsx similarity index 96% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/ReputationTokenGroupCard.tsx rename to packages/nextjs/components/rep-tokens/cards/ReputationTokenGroupCard.tsx index 8d1f572..8d0bad7 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/ReputationTokenGroupCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/ReputationTokenGroupCard.tsx @@ -1,4 +1,4 @@ -import { TokenGroup } from "../../hooks/Hooks"; +import { TokenGroup } from "../hooks/Hooks"; import { ReputationTokenCard } from "./ReputationTokenCard"; export interface TokenCardInternalProps { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/BalanceImageOverlay.tsx b/packages/nextjs/components/rep-tokens/cards/internal/BalanceImageOverlay.tsx similarity index 92% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/BalanceImageOverlay.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/BalanceImageOverlay.tsx index d13437b..b680f0d 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/BalanceImageOverlay.tsx +++ b/packages/nextjs/components/rep-tokens/cards/internal/BalanceImageOverlay.tsx @@ -1,6 +1,6 @@ -import { Color } from "./Stylized"; import { StylizedBalanceCard } from "./StylizedBalanceCard"; import { StylizedImageCard } from "./StylizedImageCard"; +import { Color } from "./deprecated/Stylized"; type BalanceProps = { balance: number; diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedAddressCard.tsx b/packages/nextjs/components/rep-tokens/cards/internal/StylizedAddressCard.tsx similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedAddressCard.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/StylizedAddressCard.tsx diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedBalanceCard.tsx b/packages/nextjs/components/rep-tokens/cards/internal/StylizedBalanceCard.tsx similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedBalanceCard.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/StylizedBalanceCard.tsx diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedImageCard.tsx b/packages/nextjs/components/rep-tokens/cards/internal/StylizedImageCard.tsx similarity index 94% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedImageCard.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/StylizedImageCard.tsx index eb73d45..73cfc6f 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedImageCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/internal/StylizedImageCard.tsx @@ -1,5 +1,5 @@ import Image from "next/image"; -import { Color } from "./Stylized"; +import { Color } from "./deprecated/Stylized"; export interface ImageCardPropsInternal { src: string; diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedStringCard.tsx b/packages/nextjs/components/rep-tokens/cards/internal/StylizedStringCard.tsx similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/StylizedStringCard.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/StylizedStringCard.tsx diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/Stylized.ts b/packages/nextjs/components/rep-tokens/cards/internal/deprecated/Stylized.ts similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/Stylized.ts rename to packages/nextjs/components/rep-tokens/cards/internal/deprecated/Stylized.ts diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenCard.tsx b/packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenCard.tsx similarity index 97% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenCard.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenCard.tsx index fb78834..8678455 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenCard.tsx @@ -1,6 +1,6 @@ import { Token } from "../../../hooks/Hooks"; +import { ReputationComponent } from "../../ReputationTokenGroupCard"; import { BalanceImageOverlay } from "../BalanceImageOverlay"; -import { ReputationComponent } from "../ReputationTokenGroupCard"; import { StylizedAddressCard } from "../StylizedAddressCard"; import { StylizedBalanceCard } from "../StylizedBalanceCard"; import { StylizedImageCard } from "../StylizedImageCard"; diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenCard2.tsx b/packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenCard2.tsx similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenCard2.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenCard2.tsx diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenGroupCard2.tsx b/packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenGroupCard2.tsx similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenGroupCard2.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenGroupCard2.tsx diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenGroupCard3.tsx b/packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenGroupCard3.tsx similarity index 100% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/deprecated/StylizedTokenGroupCard3.tsx rename to packages/nextjs/components/rep-tokens/cards/internal/deprecated/StylizedTokenGroupCard3.tsx diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/AddressCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/AddressCard.tsx similarity index 78% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/AddressCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/AddressCard.tsx index ca4f2f8..2837db1 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/AddressCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/AddressCard.tsx @@ -1,4 +1,4 @@ -import { StylizedAddressCard } from "../StylizedAddressCard"; +import { StylizedAddressCard } from "../internal/StylizedAddressCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/BalanceCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/BalanceCard.tsx similarity index 85% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/BalanceCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/BalanceCard.tsx index 2103621..a45ab86 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/BalanceCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/BalanceCard.tsx @@ -1,4 +1,4 @@ -import { StylizedBalanceCard } from "../StylizedBalanceCard"; +import { StylizedBalanceCard } from "../internal/StylizedBalanceCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/DescriptionCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/DescriptionCard.tsx similarity index 83% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/DescriptionCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/DescriptionCard.tsx index a22847f..df451e0 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/DescriptionCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/DescriptionCard.tsx @@ -1,4 +1,4 @@ -import { StylizedStringCard } from "../StylizedStringCard"; +import { StylizedStringCard } from "../internal/StylizedStringCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/ImageCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/ImageCard.tsx similarity index 79% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/ImageCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/ImageCard.tsx index c74b717..e6786fa 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/ImageCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/ImageCard.tsx @@ -1,4 +1,4 @@ -import { StylizedImageCard } from "../StylizedImageCard"; +import { StylizedImageCard } from "../internal/StylizedImageCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/MaxMintAmountPerTxCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/MaxMintAmountPerTxCard.tsx similarity index 87% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/MaxMintAmountPerTxCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/MaxMintAmountPerTxCard.tsx index 08cfb66..436213f 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/MaxMintAmountPerTxCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/MaxMintAmountPerTxCard.tsx @@ -1,4 +1,4 @@ -import { StylizedStringCard } from "../StylizedStringCard"; +import { StylizedStringCard } from "../internal/StylizedStringCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/NameCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/NameCard.tsx similarity index 81% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/NameCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/NameCard.tsx index d69016c..944324c 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/NameCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/NameCard.tsx @@ -1,4 +1,4 @@ -import { StylizedStringCard } from "../StylizedStringCard"; +import { StylizedStringCard } from "../internal/StylizedStringCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/TokenTypeCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-properties/TokenTypeCard.tsx similarity index 92% rename from packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/TokenTypeCard.tsx rename to packages/nextjs/components/rep-tokens/cards/token-properties/TokenTypeCard.tsx index e8e51a7..04b5e1e 100644 --- a/packages/nextjs/components/rep-tokens/cards/stylized-cards/token-properties/TokenTypeCard.tsx +++ b/packages/nextjs/components/rep-tokens/cards/token-properties/TokenTypeCard.tsx @@ -1,4 +1,4 @@ -import { StylizedStringCard } from "../StylizedStringCard"; +import { StylizedStringCard } from "../internal/StylizedStringCard"; import { Token } from "~~/components/rep-tokens/hooks/Hooks"; type Props = { diff --git a/packages/nextjs/components/rep-tokens/types/Types.tsx b/packages/nextjs/components/rep-tokens/types/Types.tsx deleted file mode 100644 index 3a792c8..0000000 --- a/packages/nextjs/components/rep-tokens/types/Types.tsx +++ /dev/null @@ -1,41 +0,0 @@ -export interface CardClasses { - card?: string; - value?: string; -} - -export interface IsPrettyLoading { - classes?: string; - message?: string; -} - -export interface ValueCardConfigProps { - isRendering?: boolean; - classes?: CardClasses; - isPrettyLoading?: IsPrettyLoading; - // isPrettyLoading?: boolean; -} - -export interface TokenCardValuesConfigProps { - balanceConfigProps?: ValueCardConfigProps; - nameConfigProps?: ValueCardConfigProps; - descriptionConfigProps?: ValueCardConfigProps; - addressConfigProps?: ValueCardConfigProps; - isSoulboundConfigProps?: ValueCardConfigProps; - isRedeemableConfigProps?: ValueCardConfigProps; - maxMintAmountConfigProps?: ValueCardConfigProps; -} - -export interface TokenCardConfigProps { - isRendering?: true; - cardClasses?: string; - valuesProps?: TokenCardValuesConfigProps; - isPrettyLoading?: IsPrettyLoading; -} - -export interface TokenGroupCardConfigProps { - isRendering: boolean; - cardClasses?: CardClasses; - address?: ValueCardConfigProps; - isPrettyLoading?: IsPrettyLoading; - tokenCardConfigProps: TokenCardConfigProps; -}