// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 import React from 'react' import useNotifications from '../../contexts/Notifications/useNotifications' import { ReactComponent as CheckmarkIcon } from '../../assets/checkmark.svg' import { ReactComponent as ErrorIcon } from '../../assets/error.svg' import './Notifications.css' const Notifications = () => { const { notifications } = useNotifications() const renderIcon = (type) => { switch (type) { case 'success': { return } case 'error': { return } default: return null } } return (
{notifications.map(({ message, type, id }) => (
{renderIcon(type)}

{message}

))}
) } export default Notifications