Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
535 Bytes
import { createSlice } from '@reduxjs/toolkit';
import { getItemFromLocalStorage } from '../../helper/localStorage';
const initialState = {
currentPostData: getItemFromLocalStorage('postDataToManage') || null,
};
const currentPostSlice = createSlice({
name: 'currentPost',
initialState,
reducers: {
setCurrentPostData: (state, action) => {
state.currentPostData = action.payload;
},
},
});
export const { setCurrentPostData } = currentPostSlice.actions;
export default currentPostSlice.reducer;