import React, { FC } from 'react'; import type { IUser, IPage, HasObjectId } from '@growi/core'; import type { IInAppNotification, PaginateResult } from '~/interfaces/in-app-notification'; import InAppNotificationElm from './InAppNotificationElm'; type Props = { inAppNotificationData?: PaginateResult>, elemClassName?: string, type?: 'button' | 'dropdown-item', }; const InAppNotificationList: FC = (props: Props) => { const { inAppNotificationData } = props; if (inAppNotificationData == null) { return (
); } const notifications = inAppNotificationData.docs; return ( <> { notifications.map((notification: IInAppNotification & HasObjectId) => { return ( ); }) } ); }; export default InAppNotificationList;