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