Feat:Added slice for redux for hdfspath

This commit is contained in:
Atharva Ombase
2025-04-16 15:28:20 +05:30
parent 6aae767aa6
commit e59784bfa9
+19
View File
@@ -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;