diff --git a/src/components/common/CardMetaRow.tsx b/src/components/common/CardMetaRow.tsx new file mode 100644 index 00000000..35b0e284 --- /dev/null +++ b/src/components/common/CardMetaRow.tsx @@ -0,0 +1,38 @@ +import type { ReactNode } from 'react'; +import { cn } from '@/lib/utils'; + +interface CardMetaRowProps { + label: ReactNode; + value: ReactNode; + className?: string; + valueClassName?: string; + truncateValue?: boolean; + valueTitle?: string; +} + +const CardMetaRow: React.FC = ({ + label, + value, + className, + valueClassName, + truncateValue = true, + valueTitle, +}) => { + return ( +
+ {label} + + {value} + +
+ ); +}; + +export default CardMetaRow; diff --git a/src/components/common/CreatorCard.tsx b/src/components/common/CreatorCard.tsx index f2971f22..e03a4ea8 100644 --- a/src/components/common/CreatorCard.tsx +++ b/src/components/common/CreatorCard.tsx @@ -7,8 +7,8 @@ import { ShoppingCart, Wallet, Link as LinkIcon } from 'lucide-react'; import toast from 'react-hot-toast'; import showToast from '@/utils/toast.util'; import TransactionRetryNotice from '@/components/common/TransactionRetryNotice'; +import CardMetaRow from '@/components/common/CardMetaRow'; import VerifiedBadge from '@/components/common/VerifiedBadge'; -import CategoryTag from '@/components/common/CategoryTag'; import CompactEmptyWalletState from '@/components/common/CompactEmptyWalletState'; interface CreatorCardProps { @@ -60,7 +60,7 @@ const CreatorCard: React.FC = ({ creator, className }) => { return (
@@ -86,40 +86,37 @@ const CreatorCard: React.FC = ({ creator, className }) => {

@{creator.instructorId || 'creator'}

-
- +
+ + + Handle + + } + value={creator.socialHandle ? `@${creator.socialHandle}` : 'No public handle'} + valueTitle={creator.socialHandle ? `@${creator.socialHandle}` : undefined} + valueClassName={creator.socialHandle ? 'text-white/75' : 'italic text-white/35'} + /> +
- {creator.socialHandle ? ( -
- - @{creator.socialHandle} -
- ) : ( -
- - No public handle -
- )}
-
-
-

- Key Price -

-

- {creator.price} ETH -

-
+