Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 31 lines 880 B view raw
1import { MenuItem } from "@headlessui/react"; 2import { FlagIcon } from "@heroicons/react/24/outline"; 3import type { AccountFragment } from "@hey/indexer"; 4import cn from "@/helpers/cn"; 5import { useReportAccountModalStore } from "@/store/non-persisted/modal/useReportAccountModalStore"; 6 7interface ReportProps { 8 account: AccountFragment; 9} 10 11const Report = ({ account }: ReportProps) => { 12 const { setShowReportAccountModal } = useReportAccountModalStore(); 13 14 return ( 15 <MenuItem 16 as="div" 17 className={({ focus }) => 18 cn( 19 { "dropdown-active": focus }, 20 "m-2 flex cursor-pointer items-center space-x-2 rounded-lg px-2 py-1.5 text-sm" 21 ) 22 } 23 onClick={() => setShowReportAccountModal(true, account)} 24 > 25 <FlagIcon className="size-4" /> 26 <div>Report account</div> 27 </MenuItem> 28 ); 29}; 30 31export default Report;