11"use client" ;
22
3+ import { ExternalLinkIcon } from "lucide-react" ;
34import Link from "next/link" ;
45import { type ThirdwebClient , ZERO_ADDRESS } from "thirdweb" ;
56import {
@@ -9,7 +10,6 @@ import {
910 AccountName ,
1011 AccountProvider ,
1112} from "thirdweb/react" ;
12- import { Button } from "@/components/ui/button" ;
1313import { Skeleton } from "@/components/ui/skeleton" ;
1414import { useEns } from "@/hooks/contract-hooks" ;
1515import { replaceDeployerAddress } from "@/lib/publisher-utils" ;
@@ -29,57 +29,63 @@ export const PublisherHeader: React.FC<PublisherHeaderProps> = ({
2929 } ) ;
3030
3131 return (
32- < div className = "flex w-full flex-col gap-4" >
33- < h4 className = "font-semibold text-lg tracking-tight" > Published by</ h4 >
34-
32+ < div >
33+ < h4 className = "font-medium text-base mb-3" > Published by</ h4 >
3534 < AccountProvider
3635 // passing zero address during loading time to prevent the component from crashing
3736 address = { ensQuery . data ?. address || ZERO_ADDRESS }
3837 client = { client }
3938 >
40- < div className = "relative flex items-center gap-3" >
41- < AccountAvatar
42- className = "size-10 rounded-full border border-border border-solid object-cover"
43- fallbackComponent = {
44- < AccountBlobbie className = "size-10 rounded-full" />
45- }
46- loadingComponent = { < Skeleton className = "size-10 rounded-full" /> }
47- />
48-
49- < Link
50- className = "before:absolute before:inset-0 hover:underline"
51- href = { replaceDeployerAddress (
52- `/${ ensQuery . data ?. ensName || wallet } ` ,
53- ) }
54- rel = "noopener noreferrer"
55- target = "_blank"
56- >
57- < AccountName
58- className = "font-medium"
39+ < div className = "flex items-center gap-3 relative" >
40+ < div className = "translate-y-0.5" >
41+ < AccountAvatar
42+ className = "size-[34px] rounded-full border border-border border-solid object-cover"
5943 fallbackComponent = {
60- // When social profile API support other TLDs as well - we can remove this condition
61- ensQuery . data ?. ensName ? (
62- < span > { ensQuery . data ?. ensName } </ span >
63- ) : (
64- < AccountAddress
65- formatFn = { ( addr ) =>
66- shortenIfAddress ( replaceDeployerAddress ( addr ) )
67- }
68- />
69- )
44+ < AccountBlobbie className = "size-[34px] rounded-full" />
45+ }
46+ loadingComponent = {
47+ < Skeleton className = "size-[34px] rounded-full" />
7048 }
71- formatFn = { ( name ) => replaceDeployerAddress ( name ) }
72- loadingComponent = { < Skeleton className = "h-8 w-40" /> }
7349 />
74- </ Link >
50+ </ div >
51+
52+ < div className = "space-y-1" >
53+ < Link
54+ className = "hover:underline leading-none before:absolute before:inset-0"
55+ href = { replaceDeployerAddress (
56+ `/${ ensQuery . data ?. ensName || wallet } ` ,
57+ ) }
58+ rel = "noopener noreferrer"
59+ target = "_blank"
60+ >
61+ < AccountName
62+ className = "text-base leading-none font-medium"
63+ fallbackComponent = {
64+ // When social profile API support other TLDs as well - we can remove this condition
65+ ensQuery . data ?. ensName ? (
66+ < span className = "text-base leading-none font-medium" >
67+ { ensQuery . data ?. ensName }
68+ </ span >
69+ ) : (
70+ < AccountAddress
71+ formatFn = { ( addr ) =>
72+ shortenIfAddress ( replaceDeployerAddress ( addr ) )
73+ }
74+ />
75+ )
76+ }
77+ formatFn = { ( name ) => replaceDeployerAddress ( name ) }
78+ loadingComponent = { < Skeleton className = "h-6 w-40" /> }
79+ />
80+ </ Link >
81+
82+ < span className = "text-sm text-muted-foreground flex items-center gap-1.5 leading-none" >
83+ View all published contracts{ " " }
84+ < ExternalLinkIcon className = "size-3 text-muted-foreground" />
85+ </ span >
86+ </ div >
7587 </ div >
7688 </ AccountProvider >
77-
78- < Button asChild className = "bg-card" variant = "outline" >
79- < Link href = { replaceDeployerAddress ( `/${ wallet } ` ) } >
80- View all contracts
81- </ Link >
82- </ Button >
8389 </ div >
8490 ) ;
8591} ;
0 commit comments