loan_market_dashboard/src/features/auth/authSlice.js
2023-08-18 07:34:30 +07:00

20 lines
413 B
JavaScript

import { createSlice } from "@reduxjs/toolkit";
const initialState = {}
const authSlice = createSlice({
name: 'auth',
initialState,
reducers: {
authAdded(state, action) {
const { current_user } = action.payload;
let newState = { ...state }
newState = current_user
return newState
}
}
})
export const { authAdded } = authSlice.actions;
export default authSlice.reducer;