// #region [Imports] =================================================================================================== // Libraries import { Button, Card } from 'antd'; import { CloseOutlined } from '@ant-design/icons'; // Types import { ISingleNotice } from '../../../types/notices'; // Helpers import { sanitizeHtml } from '../../../../shared/utils'; // #endregion [Imports] // #region [Variables] ================================================================================================= declare var acfwAdminApp: any; // #endregion [Variables] // #region [Interfaces]================================================================================================= interface IProps { notice: ISingleNotice; onDismiss: (slug: string, nonce: string, response?: string) => void; onRead: (slug: string, nonce: string) => void; } // #endregion [Interfaces] // #region [Component] ================================================================================================= const SingleNotice = (props: IProps) => { const { notice: { slug, heading, content, type, nonce, actions, is_dismissable, is_in_app_notifications }, onDismiss, onRead, } = props; const { dashboard_page: { labels }, } = acfwAdminApp; return ( onRead(slug, nonce) : undefined} > {heading && (

{heading}

)}
{content.map((text, i) => (

))}

{actions.map((action, i) => ( ))} {is_dismissable && slug !== 'review_request' && ( )}
{is_dismissable && (