mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Add basic structure
This commit is contained in:
19
src/store/slices/profileSlice.js
Normal file
19
src/store/slices/profileSlice.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
const initialState = null;
|
||||
|
||||
export const profileSlice = createSlice({
|
||||
name: 'profile',
|
||||
initialState: initialState,
|
||||
reducers: {
|
||||
setProfile: (state, action) => {
|
||||
state = action.payload;
|
||||
|
||||
return state;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export const { setProfile } = profileSlice.actions;
|
||||
|
||||
export default profileSlice.reducer;
|
||||
Reference in New Issue
Block a user