Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import type { AccountFragment } from "@hey/indexer";
2import { Link } from "react-router";
3import { Image, Tooltip } from "@/components/Shared/UI";
4
5interface ENSBadgeProps {
6 account: AccountFragment;
7 className?: string;
8 linkToDashboard?: boolean;
9}
10
11const ENSBadge = ({
12 account,
13 className,
14 linkToDashboard = false
15}: ENSBadgeProps) => {
16 if (!account.heyEns) {
17 return null;
18 }
19
20 const Logo = (
21 <Image
22 className={className}
23 src="https://ens.domains/assets/brand/mark/ens-mark-Blue.svg"
24 />
25 );
26
27 return (
28 <Tooltip content={`${account.heyEns.localName}.hey.xyz`} placement="right">
29 {linkToDashboard ? (
30 <Link
31 target="_blank"
32 to={`https://app.ens.domains/${account.heyEns.localName}.hey.xyz`}
33 >
34 {Logo}
35 </Link>
36 ) : (
37 Logo
38 )}
39 </Tooltip>
40 );
41};
42
43export default ENSBadge;