mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 15:48:23 -05:00
Close mobile panel on notification click
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user