Skip to content

Commit

Permalink
Always persist error snackbars (#633)
Browse files Browse the repository at this point in the history
Signed-off-by: sBouzols <sylvain.bouzols@gmail.com>
  • Loading branch information
sBouzols authored Nov 8, 2024
1 parent 090dc91 commit 28c340f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hooks/useSnackMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export function useSnackMessage(): UseSnackMessageReturn {
persist
}
*/
const snackError = useCallback((snackInputs: SnackInputs) => enqueue(snackInputs, 'error'), [enqueue]);
const snackError = useCallback(
(snackInputs: SnackInputs) => enqueue({ ...snackInputs, persist: true }, 'error'),
[enqueue]
);

/* see snackError */
const snackWarning = useCallback((snackInputs: SnackInputs) => enqueue(snackInputs, 'warning'), [enqueue]);
Expand Down

0 comments on commit 28c340f

Please sign in to comment.