import React, { useCallback } from 'react'; import { Divider, Visible, Card } from 'components'; import { Container, StyleSystemThemedProps } from 'components/layout'; import { NewItem } from '../new-item'; export const New: React.FC = ({ ...props }) => { const news = [ { id: 1, title: 'Little Big Updates: dispatches from Quality Week of the type', body: 'Stories about seemingly-small bugs, and the art of distinguishing the little details from the little-big ones.', createdAt: '10 h ago', }, { id: 2, title: 'Little Big Updates: 32 fixes and features for a better workflow', body: 'Stories about seemingly-small bugs, and the art of distinguishing the little details from the little-big ones. to the best wishes', createdAt: '12 h ago', }, ]; const isDivider = useCallback( (index: number) => { return index < news.length - 1; }, [news.length] ); return ( {news.map(({ createdAt, id, body, title }, index) => { return ( ); })} ); };