summaryrefslogtreecommitdiff
path: root/extension/react-app/src/redux/slices/miscSlice.ts
blob: 3990ac09226ab85606ec59906814198896e0281d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { createSlice } from "@reduxjs/toolkit";

export const miscSlice = createSlice({
  name: "misc",
  initialState: {
    highlightedCode: "",
    takenAction: false,
  },
  reducers: {
    setHighlightedCode: (state: any, action) => {
      state.highlightedCode = action.payload;
    },
    setTakenActionTrue: (state: any, action) => {
      state.takenAction = true;
    },
  },
});

export const { setHighlightedCode, setTakenActionTrue } = miscSlice.actions;
export default miscSlice.reducer;