Files
lume/src/stores/stronghold.tsx
2023-07-09 17:38:54 +07:00

20 lines
458 B
TypeScript

import { create } from 'zustand';
interface StrongholdState {
password: null | string;
privkey: null | string;
setPassword: (password: string) => void;
setPrivkey: (privkey: string) => void;
}
export const useStronghold = create<StrongholdState>((set) => ({
password: null,
privkey: null,
setPassword: (password: string) => {
set({ password: password });
},
setPrivkey: (privkey: string) => {
set({ privkey: privkey });
},
}));