Spaces:
Paused
Paused
Download client/src/store/sidebarSlice.js from arabdullah/chatty: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/spaces/arabdullah/chatty/resolve/main/client/src/store/sidebarSlice.js
- Command line
-
hf download hf://spaces/arabdullah/chatty/client/src/store/sidebarSlice.js
-
curl -L -o sidebarSlice.js https://huggingface.co/spaces/arabdullah/chatty/resolve/main/client/src/store/sidebarSlice.js
441 Bytes
| import { createSlice } from "@reduxjs/toolkit"; | |
| const initialState = { | |
| // To set the current page on display in sidebar | |
| activePage: "chatList", | |
| }; | |
| const sidebarSlice = createSlice({ | |
| name: "sidebar", | |
| initialState, | |
| reducers: { | |
| changeActivePage: (state, { payload }) => { | |
| state.activePage = payload.newActivePage; | |
| }, | |
| }, | |
| }); | |
| export const sidebarActions = sidebarSlice.actions; | |
| export default sidebarSlice.reducer; | |