import React from 'react'; import { Link } from 'gatsby'; import styles from './Notification.module.less'; export interface NotificationProps { index?: number; type: string; title: string; date: string; link: string; } const numberImages = [ 'https://gw.alipayobjects.com/zos/antfincdn/IqREAm36K7/1.png', 'https://gw.alipayobjects.com/zos/antfincdn/3fG1Iqjfnz/2.png', ]; const Notification: React.FC = ({ index = 0, type, title, date, link = '', }) => { const children = (
{index.toString()}

{type} ‧ {title}

{date}

); if (link.startsWith('http')) { return ( {children} ); } return ( {children} ); }; export default Notification;