diff --git a/libs/mibao-ui/src/lib/issuer/issuer.tsx b/libs/mibao-ui/src/lib/issuer/issuer.tsx index 107c2902..5365ee4f 100644 --- a/libs/mibao-ui/src/lib/issuer/issuer.tsx +++ b/libs/mibao-ui/src/lib/issuer/issuer.tsx @@ -17,6 +17,7 @@ export interface IssuerProps extends AvatarProps { onClick?: React.MouseEventHandler disableCopy?: boolean displayId?: string + isLinkExternal?: boolean } export const Issuer: React.FC = ({ @@ -34,9 +35,10 @@ export const Issuer: React.FC = ({ disableCopy = false, size = '60px', resizeScale = 150, + isLinkExternal = true, ...avatarProps }) => { - const anchorProps = href && !isBanned ? { as: Link, href, isExternal: true } : undefined + const anchorProps = href && !isBanned ? { as: Link, href, isExternal: isLinkExternal } : undefined const isOneline = id == null && verifiedTitle == null return ( = ({ @@ -50,10 +51,11 @@ export const NFTCard: React.FC = ({ issuerProps, limitProps, titleProps, + isLinkExternal = true, ...rest }) => { const isBanned = !!isIssuerBanned || !!isNFTBanned - const anchorProps = href && !isBanned ? { as: Link, href, isExternal: true } : undefined + const anchorProps = href && !isBanned ? { as: Link, href, isExternal: isLinkExternal } : undefined const info = useMemo(() => { if (likeProps && issuerProps && limitProps) { diff --git a/libs/mibao-ui/src/lib/nft-list-item/nft-list-item.tsx b/libs/mibao-ui/src/lib/nft-list-item/nft-list-item.tsx index 554e0bc0..b320f807 100644 --- a/libs/mibao-ui/src/lib/nft-list-item/nft-list-item.tsx +++ b/libs/mibao-ui/src/lib/nft-list-item/nft-list-item.tsx @@ -18,6 +18,7 @@ export interface NFTListItemProps extends FlexProps { title?: string bannedText?: string href?: string + isLinkExternal?: boolean srcQueryParams?: { tid: number, locale: string } src?: string locale?: string @@ -44,10 +45,11 @@ export const NFTListItem: React.FC = ({ issuerProps, limitProps, titleProps, + isLinkExternal = true, ...rest }) => { const isBanned = !!isIssuerBanned || !!isNFTBanned - const anchorProps = href && !isBanned ? { as: Link, href, isExternal: true } : undefined + const anchorProps = href && !isBanned ? { as: Link, href, isExternal: isLinkExternal } : undefined return (