/* eslint-disable react/no-danger */ import Link from 'uwf/Link'; import useStyles from 'uwf/useStyles'; import React from 'react'; import { withHomeNews } from './news.graphql'; import Layout from '../../components/Layout'; import s from './home.css'; type Props = {}; export const title = 'React Starter Kit'; const Home = withHomeNews()(props => { useStyles(s); const { loading, reactjsGetAllNews, networkStatus: { isConnected }, } = props.data!; return (

{isConnected ? 'Online' : 'Offline'}

React.js News

{loading || !reactjsGetAllNews ? 'Loading...' : reactjsGetAllNews.map(item => { const content = item.content.length <= 200 ? item.content : `${item.content.slice(0, 200)}...`; return (

{item.title}

); })}
); }); export default Home;