2017-06-29 12:54:02 -06:00
|
|
|
import { AuthState } from "./interfaces";
|
|
|
|
import { generateReducer } from "../redux/generate_reducer";
|
|
|
|
import { Actions } from "../constants";
|
|
|
|
|
2019-12-10 12:53:20 -07:00
|
|
|
export const authReducer = generateReducer<AuthState | undefined>(undefined)
|
2018-03-13 16:37:24 -06:00
|
|
|
.add<AuthState>(Actions.REPLACE_TOKEN, (_, { payload }) => {
|
2017-06-29 12:54:02 -06:00
|
|
|
return payload;
|
|
|
|
});
|