[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
661 B

import { Action } from 'redux'
export interface SetAuthenticatedAction extends Action {
type: 'AUTHENTICATION_SET_AUTHENTICATED'
payload: boolean
}
export interface SetUserAction extends Action {
type: 'AUTHENTICATION_SET_USER'
payload: string
}
export type AuthenticationActions = SetAuthenticatedAction | SetUserAction
const setAuthenticated = (authenticated: boolean): SetAuthenticatedAction => ({
type: 'AUTHENTICATION_SET_AUTHENTICATED',
payload: authenticated,
})
const setUser = (userId: string): SetUserAction => ({
type: 'AUTHENTICATION_SET_USER',
payload: userId,
})
export {
setAuthenticated,
setUser,
}