|
|
@@ -10,12 +10,12 @@ import { useModelNotification } from './PageNotification';
|
|
|
|
|
|
interface Props {
|
|
|
notification: IInAppNotification & HasObjectId
|
|
|
- onClick?: () => void,
|
|
|
+ onUnopenedNotificationOpend?: () => void,
|
|
|
}
|
|
|
|
|
|
const InAppNotificationElm: FC<Props> = (props: Props) => {
|
|
|
|
|
|
- const { notification, onClick } = props;
|
|
|
+ const { notification, onUnopenedNotificationOpend } = props;
|
|
|
|
|
|
const modelNotificationUtils = useModelNotification(notification);
|
|
|
|
|
|
@@ -30,10 +30,10 @@ const InAppNotificationElm: FC<Props> = (props: Props) => {
|
|
|
if (notification.status === InAppNotificationStatuses.STATUS_UNOPENED) {
|
|
|
// set notification status "OPEND"
|
|
|
await apiv3Post('/in-app-notification/open', { id: notification._id });
|
|
|
+ onUnopenedNotificationOpend?.();
|
|
|
}
|
|
|
|
|
|
publishOpen();
|
|
|
- onClick?.();
|
|
|
};
|
|
|
|
|
|
const renderActionUserPictures = (): JSX.Element => {
|