diff --git a/src/components/common/CreatorProfileHeader.tsx b/src/components/common/CreatorProfileHeader.tsx index 51e1929..5a174e5 100644 --- a/src/components/common/CreatorProfileHeader.tsx +++ b/src/components/common/CreatorProfileHeader.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; -import { Copy, Check, Share2 } from 'lucide-react'; +import { Copy, Check, Share2, Pencil } from 'lucide-react'; import showToast from '@/utils/toast.util'; import appendUtmParams from '@/utils/utm.utils'; import { copyTextToClipboard } from '@/utils/clipboard.utils'; @@ -12,6 +12,7 @@ import CreatorBio from '@/components/common/CreatorBio'; import { formatCreatorHandle } from '@/utils/handleDisplay.utils'; import { normalizeCreatorDisplayName } from '@/utils/creatorDisplayName.utils'; import { CREATOR_CARD_MEDIA_RADIUS_CLASS } from '@/utils/creatorCardTokens'; +import { isOwnWallet } from '@/utils/isOwnWallet'; interface CreatorProfileHeaderProps { name: string; @@ -21,6 +22,7 @@ interface CreatorProfileHeaderProps { isVerified?: boolean; bio?: string | null; className?: string; + connectedWalletAddress?: string | null; } const CREATOR_PROFILE_SUBTITLE_WRAP_CLASS_NAME = @@ -34,6 +36,7 @@ const CreatorProfileHeader: React.FC = ({ isVerified, bio, className, + connectedWalletAddress, }) => { const [copied, setCopied] = useState(false); const [isScrolled, setIsScrolled] = useState(false); @@ -50,6 +53,10 @@ const CreatorProfileHeader: React.FC = ({ // URL construction the caller might do via the prop. const displayHandle = formatCreatorHandle(handle); const displayName = normalizeCreatorDisplayName(name) || 'Unnamed creator'; + const normalizedCreatorId = + creatorId == null ? creatorId : String(creatorId); + +const own = isOwnWallet(connectedWalletAddress, normalizedCreatorId); const handleShare = async () => { let url = window.location.href; @@ -163,13 +170,41 @@ const CreatorProfileHeader: React.FC = ({ -
- + + + )} +