diff --git a/components/twitter-profile/index.tsx b/components/twitter-profile/index.tsx index 0161fa5..00d14bf 100644 --- a/components/twitter-profile/index.tsx +++ b/components/twitter-profile/index.tsx @@ -8,16 +8,17 @@ import ICNSIcon from "../../public/images/svg/icns-logo.svg"; interface Props { isOwner?: boolean; + registeredTwitterName?: string; twitterProfileInformation?: TwitterAuthInfoResponse | null; } export const TwitterProfile: FunctionComponent = (props) => { - const { isOwner, twitterProfileInformation } = props; + const { isOwner, registeredTwitterName, twitterProfileInformation } = props; const [isCopied, setIsCopied] = useState(false); const onClickInviteLink = async () => { await navigator.clipboard.writeText( - `https://app.icns.xyz?referral=${twitterProfileInformation?.username}`, + `https://app.icns.xyz?referral=${registeredTwitterName}`, ); setIsCopied(true); @@ -29,49 +30,51 @@ export const TwitterProfile: FunctionComponent = (props) => { return ( - {isCopied ? ( - - copied - - - - - ) : ( - - copy invite link - - - - - - )} + {registeredTwitterName ? ( + isCopied ? ( + + copied + + + + + ) : ( + + copy invite link + + + + + + ) + ) : null}