# image-optimization/1.7.4/modules/reviews/assets/src/components/notification.js

Image Optimizer – Compress Images and Convert to WebP or AVIF, version 1.7.4. 40 lines.

- Page: https://pluginprobe.com/plugins/image-optimization/1.7.4/code/modules/reviews/assets/src/components/notification.js
- Raw: https://pluginprobe.com/plugins/image-optimization/1.7.4/raw/modules/reviews/assets/src/components/notification.js
- Modified: 2026-01-20T08:04:18+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/image-optimization/1.7.4/code/modules/reviews/assets/src/components/notification.js#L10-L20`.

```javascript
import CloseButton from '@elementor/ui/CloseButton';
import Snackbar from '@elementor/ui/Snackbar';
import SnackbarContent from '@elementor/ui/SnackbarContent';
import { useSettings } from '../hooks/use-settings';

const ReviewNotifications = ( { type, message } ) => {
	const {
		showNotification,
		setShowNotification,
		setNotificationMessage,
		setNotificationType,
	} = useSettings();

	const closeNotification = () => {
		setShowNotification( ! showNotification );
		setNotificationMessage( '' );
		setNotificationType( '' );
	};

	if ( ! showNotification ) {
		return null;
	}

	return (
		<Snackbar
			open={ showNotification }
			autoHideDuration={ type === 'error' ? 10000 : 2000 }
			onClose={ closeNotification }
			anchorOrigin={ { vertical: 'bottom', horizontal: 'right' } }
			sx={ { zIndex: 99999 } }
		>
			<SnackbarContent
				message={ message }
				action={ <CloseButton color="inherit" onClick={ closeNotification } /> } />
		</Snackbar>
	);
};

export default ReviewNotifications;

```
