mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Add support for flash messages utilizing redux
This commit is contained in:
17
resources/scripts/redux/actions/flash.ts
Normal file
17
resources/scripts/redux/actions/flash.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { FlashMessage } from '@/redux/types';
|
||||
|
||||
export const PUSH_FLASH_MESSAGE = 'PUSH_FLASH_MESSAGE';
|
||||
export const REMOVE_FLASH_MESSAGE = 'REMOVE_FLASH_MESSAGE';
|
||||
export const CLEAR_ALL_FLASH_MESSAGES = 'CLEAR_ALL_FLASH_MESSAGES';
|
||||
|
||||
export const pushFlashMessage = (payload: FlashMessage) => ({
|
||||
type: PUSH_FLASH_MESSAGE, payload,
|
||||
});
|
||||
|
||||
export const removeFlashMessage = (id: string) => ({
|
||||
type: REMOVE_FLASH_MESSAGE, payload: id,
|
||||
});
|
||||
|
||||
export const clearAllFlashMessages = () => ({
|
||||
type: CLEAR_ALL_FLASH_MESSAGES,
|
||||
});
|
||||
Reference in New Issue
Block a user