Files
info-target-mobile/screens/auth/login/lib/storage.ts
Samandar Turgunboyev 124798419b fitst commit
2026-01-28 18:26:50 +05:00

21 lines
488 B
TypeScript

import { create } from 'zustand';
type State = {
phone: string | null;
userType: string | null;
};
type Actions = {
savedPhone: (phone: string | null) => void;
savedUserType: (userType: string | null) => void;
};
const userInfoStore = create<State & Actions>((set) => ({
phone: null,
savedPhone: (phone: string | null) => set(() => ({ phone })),
userType: null,
savedUserType: (userType: string | null) => set(() => ({ userType })),
}));
export default userInfoStore;