diff options
author | Michael Hunteman <michael@huntm.net> | 2024-09-21 08:00:39 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-09-21 11:39:18 -0700 |
commit | 2133253836de428e58b4ba1c9b7e863485b6b870 (patch) | |
tree | 9c175fd811975a21fcf60a5b14004443d32fe989 /client/src/slices | |
parent | a54a93b724a6104213b17271fc298e37adedc1c5 (diff) |
Use snackbar globally
Diffstat (limited to 'client/src/slices')
-rw-r--r-- | client/src/slices/snackbarSlice.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/slices/snackbarSlice.ts b/client/src/slices/snackbarSlice.ts index eca9575..f76b133 100644 --- a/client/src/slices/snackbarSlice.ts +++ b/client/src/slices/snackbarSlice.ts @@ -16,17 +16,17 @@ export const snackbarSlice = createSlice({ name: 'snackbar', initialState, reducers: { - open(state, action) { + showSnackbar: (state, action) => { state.open = true; state.message = action.payload.message; state.severity = action.payload.severity; }, - close(state) { + hideSnackbar: (state) => { state.open = false; }, }, }); -export const { open, close } = snackbarSlice.actions; +export const { showSnackbar, hideSnackbar } = snackbarSlice.actions; export const selectSnackbarState = (state: RootState) => state.snackbar; export default snackbarSlice.reducer; |