import { createSlice } from "@reduxjs/toolkit";

interface CommonState {
    resources: [] | null;
}

const initialState: CommonState = {
    resources: [],
}

const commonSlice = createSlice({
    name: 'permission',
    initialState,
    reducers: {
        setResources(state, action) {
            state.resources = action.payload;
        }
    }
});

export default commonSlice.reducer;
export const { setResources } = commonSlice.actions;