blob: 504a279d8878129478cc62d6969fffe570431f95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import {createSlice, PayloadAction} from "@reduxjs/toolkit";
import {UserProfile} from "@/api";
const initialState: UserProfile = {} as UserProfile
const userProfileSlice = createSlice({
name: 'userProfile',
initialState,
reducers: {
setUserProfile(state, action: PayloadAction<UserProfile>) {
return action.payload
}
}
})
export const {
setUserProfile,
} = userProfileSlice.actions;
export default userProfileSlice.reducer;
|