Files
info-target-mobile/screens/auth/login/lib/hook.ts
Samandar Turgunboyev a7419929f8 complated project
2026-02-02 18:51:53 +05:00

17 lines
318 B
TypeScript

import { create } from 'zustand';
type State = {
token: string | null;
};
type Actions = {
savedToken: (token: string | null) => void;
};
const useTokenStore = create<State & Actions>((set) => ({
token: null,
savedToken: (token: string | null) => set(() => ({ token })),
}));
export default useTokenStore;