diff --git a/Frontend/src/store/pathSlice.js b/Frontend/src/store/pathSlice.js new file mode 100644 index 0000000..9ece651 --- /dev/null +++ b/Frontend/src/store/pathSlice.js @@ -0,0 +1,19 @@ +// src/redux/pathSlice.js +import { createSlice } from "@reduxjs/toolkit"; + +const initialState = { + currentPath: "/", +}; + +const pathSlice = createSlice({ + name: "path", + initialState, + reducers: { + setCurrentPath: (state, action) => { + state.currentPath = action.payload; + }, + }, +}); + +export const { setCurrentPath } = pathSlice.actions; +export default pathSlice.reducer;