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

export const postLock = createSlice({
  name: "postlock",
  initialState: {
    data: null,
  },
  reducers: {
    setPostLock: (state, action) => {
      state.data = action.payload;
    },
  },
  selectors: {
    selectPostLock: (state) => state.data,
  },
});

export const { setPostLock } = postLock.actions;
export const { selectPostLock } = postLock.selectors;

export default postLock.reducer;
