Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 18 lines 532 B view raw
1import { Localstorage } from "@hey/data/storage"; 2import { createPersistedTrackedStore } from "@/store/createTrackedStore"; 3 4interface State { 5 lastSeenNotificationId: string; 6 setLastSeenNotificationId: (id: string) => void; 7} 8 9const { useStore: useNotificationStore } = createPersistedTrackedStore<State>( 10 (set) => ({ 11 lastSeenNotificationId: "0", 12 setLastSeenNotificationId: (id) => 13 set(() => ({ lastSeenNotificationId: id })) 14 }), 15 { name: Localstorage.NotificationStore } 16); 17 18export { useNotificationStore };