Last active
December 1, 2020 23:34
-
-
Save mentix02/2c42b494bb725853c7e8d9ef0b5405d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const LOGIN = "LOGIN"; | |
export const LOGOUT = "LOGOUT"; | |
export interface AuthState { | |
token?: string; | |
username?: string; | |
isAuthenticated: boolean; | |
} | |
interface LoginPayload { | |
token: string; | |
username: string; | |
} | |
export interface LoginAction { | |
type: typeof LOGIN; | |
payload: LoginPayload; | |
} | |
export interface LogoutAction { | |
type: typeof LOGOUT; | |
} | |
export type AuthActionType = LoginAction | LogoutAction; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment