import React, { FC, useCallback } from 'react'; import styles from '~/components/notifications/NotificationBubble/styles.module.scss'; import { Icon } from '~/components/input/Icon'; import { IMessageNotification, INotification } from '~/redux/types'; interface IProps { notification: IMessageNotification; onClick: (notification: INotification) => void; } const NotificationMessage: FC = ({ notification, notification: { content: { text, from }, }, onClick, }) => { const onMouseDown = useCallback(() => onClick(notification), [onClick, notification]); return (
Сообщение от ~{from?.username}:
{text}
); }; export { NotificationMessage };