Spaces:
Paused
Paused
Download client/src/store/userProfileSlice.js from arabdullah/chatty: direct link, hf CLI and curl.
- Browser
- Download file 524 Bytes
-
https://huggingface.co/spaces/arabdullah/chatty/resolve/main/client/src/store/userProfileSlice.js
- Command line
-
hf download hf://spaces/arabdullah/chatty/client/src/store/userProfileSlice.js
-
curl -L -o userProfileSlice.js https://huggingface.co/spaces/arabdullah/chatty/resolve/main/client/src/store/userProfileSlice.js
524 Bytes
| import { createSlice } from "@reduxjs/toolkit"; | |
| const initialState = { | |
| visible: false, | |
| profile: {}, | |
| }; | |
| const userProfileSlice = createSlice({ | |
| name: "userProfile", | |
| initialState, | |
| reducers: { | |
| showProfile: (state) => { | |
| state.visible = true; | |
| }, | |
| hideProfile: (state) => { | |
| state.visible = false; | |
| }, | |
| setProfile: (state, { payload }) => { | |
| state.profile = payload; | |
| }, | |
| }, | |
| }); | |
| export const userProfileActions = userProfileSlice.actions; | |
| export default userProfileSlice.reducer; | |