diff --git a/src/renderer/components/notification/notification-item.component.tsx b/src/renderer/components/notification/notification-item.component.tsx index 65de6776..4f2234e9 100644 --- a/src/renderer/components/notification/notification-item.component.tsx +++ b/src/renderer/components/notification/notification-item.component.tsx @@ -7,8 +7,9 @@ import BeatWaitingImg from "../../../../assets/images/apngs/beat-waiting.png"; import BeatImpatientImg from "../../../../assets/images/apngs/beat-impatient.png"; import { BsmButton } from "../shared/bsm-button.component"; import { useTranslation } from "renderer/hooks/use-translation.hook"; +import { ForwardedRef, forwardRef } from "react"; -export function NotificationItem({resolver, notification}: {resolver?: (value: NotificationResult|string) => void, notification: Notification}) { +export const NotificationItem = forwardRef(({resolver, notification}: {resolver?: (value: NotificationResult|string) => void, notification: Notification}, fwdRef: ForwardedRef) => { const t = useTranslation(); @@ -37,7 +38,7 @@ export function NotificationItem({resolver, notification}: {resolver?: (value: N } return ( - +
@@ -56,4 +57,4 @@ export function NotificationItem({resolver, notification}: {resolver?: (value: N resolver(NotificationResult.CLOSE)}/> ) -} +}) diff --git a/src/renderer/components/notification/notification-overlay.component.tsx b/src/renderer/components/notification/notification-overlay.component.tsx index f60b79aa..74d005ca 100644 --- a/src/renderer/components/notification/notification-overlay.component.tsx +++ b/src/renderer/components/notification/notification-overlay.component.tsx @@ -12,7 +12,7 @@ export function NotificationOverlay() { return (
    - + {notifications?.map(n => )}