From e59784bfa9d7196de91425302047c91351c58f17 Mon Sep 17 00:00:00 2001 From: Atharva Ombase <94031822+atharvaombase@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:28:20 +0530 Subject: [PATCH] Feat:Added slice for redux for hdfspath --- Frontend/src/store/pathSlice.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Frontend/src/store/pathSlice.js 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;