Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 17 lines 584 B view raw
1import getAccount from "@hey/helpers/getAccount"; 2import type { AccountFragment } from "@hey/indexer"; 3 4const formatMessage = ( 5 account: AccountFragment, 6 formatter: (username: string) => string 7): string => { 8 const { username } = getAccount(account); 9 10 return formatter(username); 11}; 12 13export const getBlockedByMeMessage = (account: AccountFragment): string => 14 formatMessage(account, (username) => `You have blocked ${username}`); 15 16export const getBlockedMeMessage = (account: AccountFragment): string => 17 formatMessage(account, (username) => `${username} has blocked you`);