Skip to content

Instantly share code, notes, and snippets.

@mentix02
Last active December 1, 2020 23:34
Show Gist options
  • Save mentix02/2c42b494bb725853c7e8d9ef0b5405d3 to your computer and use it in GitHub Desktop.
Save mentix02/2c42b494bb725853c7e8d9ef0b5405d3 to your computer and use it in GitHub Desktop.
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