Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 22 lines 680 B view raw
1import type { AccountFragment } from "@hey/indexer"; 2import { createTrackedStore } from "@/store/createTrackedStore"; 3 4interface State { 5 showReportAccountModal: boolean; 6 reportingAccount?: AccountFragment; 7 setShowReportAccountModal: ( 8 showReportAccountModal: boolean, 9 reportingAccount?: AccountFragment 10 ) => void; 11} 12 13const { useStore: useReportAccountModalStore } = createTrackedStore<State>( 14 (set) => ({ 15 reportingAccount: undefined, 16 setShowReportAccountModal: (showReportAccountModal, reportingAccount) => 17 set(() => ({ reportingAccount, showReportAccountModal })), 18 showReportAccountModal: false 19 }) 20); 21 22export { useReportAccountModalStore };