mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-11-25 15:29:54 +00:00
Add basic structure
This commit is contained in:
1 parent
050ccad47f
commit
0229b5e453
23 files changed
+47162
-1
No files matched your search
@@ -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;
|
||||
@@ -0,0 +1,10 @@
|
||||
import { combineReducers, configureStore } from '@reduxjs/toolkit';
|
||||
import profileSlice from './slices/profileSlice';
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
profile: profileSlice
|
||||
})
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: rootReducer
|
||||
})
|
||||
Reference in new issue
Block a user