# give/4.17.0/src/Campaigns/resources/admin/components/Notifications/index.tsx

GiveWP – Donation Plugin and Fundraising Platform, version 4.17.0. 19 lines.

- Page: https://pluginprobe.com/plugins/give/4.17.0/code/src/Campaigns/resources/admin/components/Notifications/index.tsx
- Raw: https://pluginprobe.com/plugins/give/4.17.0/raw/src/Campaigns/resources/admin/components/Notifications/index.tsx
- Modified: 2025-03-31T19:17:16+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.17.0/code/src/Campaigns/resources/admin/components/Notifications/index.tsx#L10-L20`.

```tsx
import {useSelect} from '@wordpress/data';
import Notification from './Notification';
import styles from './Notices.module.scss';

export default ({type}: {type: 'snackbar' | 'notice'}) => {
    //@ts-ignore
    const notifications = useSelect(select => select('givewp/campaign-notifications').getNotificationsByType(type));

    if (!notifications.length) {
        return null;
    }

    return (
        <div className={styles[`${type}Container`]}>
            {notifications.map(notification => <Notification notification={notification} />)}
        </div>
    );
}

```
