mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Close mobile panel on notification click
This commit is contained in:
parent
2b53d38c63
commit
0e88532f3a
|
|
@ -76,6 +76,7 @@ export function NotificationContent({
|
|||
<NotificationItem
|
||||
key={notification.id}
|
||||
notification={notification}
|
||||
onClose={onClose}
|
||||
/>
|
||||
{i !== notifications.length - 1 && <NotificationItemDivider />}
|
||||
</React.Fragment>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,10 @@ export function NotificationsList({ children }: { children: React.ReactNode }) {
|
|||
|
||||
export function NotificationItem({
|
||||
notification,
|
||||
onClose,
|
||||
}: {
|
||||
notification: LoaderNotification;
|
||||
onClose?: () => void;
|
||||
}) {
|
||||
const { t, i18n } = useTranslation(["common"]);
|
||||
|
||||
|
|
@ -28,6 +30,7 @@ export function NotificationItem({
|
|||
to={notificationLink(notification)}
|
||||
className={styles.item}
|
||||
data-testid="notification-item"
|
||||
onClick={onClose}
|
||||
>
|
||||
<NotificationImage notification={notification}>
|
||||
{!notification.seen ? <div className={styles.unseenDot} /> : null}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user