# give/4.18.0/src/Views/Components/AdminDetailsPage/store/actions.ts

GiveWP – Donation Plugin and Fundraising Platform, version 4.18.0. 37 lines.

- Page: https://pluginprobe.com/plugins/give/4.18.0/code/src/Views/Components/AdminDetailsPage/store/actions.ts
- Raw: https://pluginprobe.com/plugins/give/4.18.0/raw/src/Views/Components/AdminDetailsPage/store/actions.ts
- Modified: 2025-06-18T15:01:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.18.0/code/src/Views/Components/AdminDetailsPage/store/actions.ts#L10-L20`.

```typescript
import type {Notification} from '../types';

export function addSnackbarNotice(notification: Notification) {
    return {
        type: 'ADD_NOTIFICATION',
        notification: {
            ...notification,
            autoHide: notification?.autoHide ?? true,
            isDismissible: notification?.isDismissible ?? true,
            duration: notification?.duration ?? 5000,
            type: notification.type ?? 'info',
            notificationType: 'snackbar',
        },
    };
}

export function addNotice(notification: Notification) {
    return {
        type: 'ADD_NOTIFICATION',
        notification: {
            ...notification,
            autoHide: notification?.autoHide ?? false,
            isDismissible: notification?.isDismissible ?? true,
            duration: notification?.duration ?? 5000,
            type: notification.type ?? 'info',
            notificationType: 'notice',
        },
    };
}

export function dismissNotification(id: string) {
    return {
        type: 'DISMISS_NOTIFICATION',
        id,
    };
}

```
