Spaces:
Paused
Paused
Download src/store/emailPrivacyStore.ts from igorkurgin/omniroute: direct link, hf CLI and curl.
- Browser
- Download file 641 Bytes
-
https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/src/store/emailPrivacyStore.ts
- Command line
-
hf download hf://spaces/igorkurgin/omniroute/src/store/emailPrivacyStore.ts
-
curl -L -o emailPrivacyStore.ts https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/src/store/emailPrivacyStore.ts
641 Bytes
| "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; | |