Spaces:
Paused
Paused
File size: 641 Bytes
35743bd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | "use client";
import { create } from "zustand";
import { persist } from "zustand/middleware";
interface EmailPrivacyState {
/** When true, all email addresses are shown in full (unmasked). Default: false (masked). */
emailsVisible: boolean;
/** Toggle the global email visibility state. */
toggleEmailVisibility: () => void;
}
const useEmailPrivacyStore = create<EmailPrivacyState>()(
persist(
(set, get) => ({
emailsVisible: false,
toggleEmailVisibility: () => set({ emailsVisible: !get().emailsVisible }),
}),
{
name: "omniroute-email-privacy",
}
)
);
export default useEmailPrivacyStore;
|