repo_description: Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
repo_topics: blockchain crypto dapp graphql hacktoberfest lens-protocol nextjs react social-media tailwindcss turborepo typescript vitest wagmi web3
code: import type { Maybe, MetadataAttributeFragment } from "@/indexer/generated";
  
  type Key = "location" | "website" | "x" | "creatorCoinAddress";
  
  const getAccountAttribute = (
    key: Key,
    attributes: Maybe<MetadataAttributeFragment[]> = []
  ): string => {
    const attribute = attributes?.find((attr) => attr.key === key);
    return attribute?.value || "";
  };
  
  export default getAccountAttribute;
  