|
@@ -9,10 +9,11 @@ import InAppNotificationElm from './InAppNotificationElm';
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
inAppNotificationData?: PaginateResult<IInAppNotification>,
|
|
inAppNotificationData?: PaginateResult<IInAppNotification>,
|
|
|
|
|
+ onClickNotificationElm?: () => void,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const InAppNotificationList: FC<Props> = (props: Props) => {
|
|
const InAppNotificationList: FC<Props> = (props: Props) => {
|
|
|
- const { inAppNotificationData } = props;
|
|
|
|
|
|
|
+ const { inAppNotificationData, onClickNotificationElm } = props;
|
|
|
|
|
|
|
|
if (inAppNotificationData == null) {
|
|
if (inAppNotificationData == null) {
|
|
|
return (
|
|
return (
|
|
@@ -30,7 +31,11 @@ const InAppNotificationList: FC<Props> = (props: Props) => {
|
|
|
<div className="list-group">
|
|
<div className="list-group">
|
|
|
{ notifications.map((notification: IInAppNotification & HasObjectId) => {
|
|
{ notifications.map((notification: IInAppNotification & HasObjectId) => {
|
|
|
return (
|
|
return (
|
|
|
- <InAppNotificationElm key={notification._id} notification={notification} />
|
|
|
|
|
|
|
+ <InAppNotificationElm
|
|
|
|
|
+ key={notification._id}
|
|
|
|
|
+ notification={notification}
|
|
|
|
|
+ onClick={onClickNotificationElm}
|
|
|
|
|
+ />
|
|
|
);
|
|
);
|
|
|
}) }
|
|
}) }
|
|
|
</div>
|
|
</div>
|