openreplay/frontend/app/components/Header/NotificationItem.js
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

26 lines
714 B
JavaScript

import { checkForRecent } from 'App/dateRange';
import React from 'react';
import styles from './notificationItem.module.css';
function NotificationItem({
notification: { notificationId, createdAt, name, text, viewed },
onClick,
}) {
return (
<div
className={styles.wrapper}
data-viewed={viewed}
onClick={() => (!viewed ? onClick(notificationId) : null)}
>
<div className={styles.time}>
{checkForRecent(createdAt, 'LLL dd, yyyy, hh:mm a')}
</div>
<div className={styles.title}>{name}</div>
{text && <div className={styles.details}>{text}</div>}
</div>
);
}
NotificationItem.displayName = 'NotificationItem';
export default NotificationItem;