upd: user role

Desrkipsi:
- global state pada user role login
- update fitur home

No Issues
This commit is contained in:
amel
2025-04-29 11:01:36 +08:00
parent b4c560b88e
commit 9b471eb269
4 changed files with 36 additions and 26 deletions

14
lib/userSlice.ts Normal file
View File

@@ -0,0 +1,14 @@
import { createSlice } from '@reduxjs/toolkit';
const userSlice = createSlice({
name: 'user',
initialState: { role: '', admin: false },
reducers: {
setEntityUser: (state, action) => {
return action.payload;
},
},
});
export const { setEntityUser } = userSlice.actions;
export default userSlice.reducer;