Prettified Code!

This commit is contained in:
gabek 2021-07-01 19:09:44 +00:00 committed by GitHub Action
parent f64d06279d
commit 5676b38b98

View File

@ -26,7 +26,13 @@ function ArticleItem({ title, url, content_html: content, date_published: date }
<article> <article>
<Collapse> <Collapse>
<Panel header={title} key={url}> <Panel header={title} key={url}>
<p className="timestamp">{dateString} (<Link href={`${OWNCAST_BASE_URL}${url}`} target="_blank" rel="noopener noreferrer">Link</Link>)</p> <p className="timestamp">
{dateString} (
<Link href={`${OWNCAST_BASE_URL}${url}`} target="_blank" rel="noopener noreferrer">
Link
</Link>
)
</p>
<div dangerouslySetInnerHTML={{ __html: content }} /> <div dangerouslySetInnerHTML={{ __html: content }} />
</Panel> </Panel>
</Collapse> </Collapse>
@ -55,8 +61,8 @@ export default function NewsFeed() {
getFeed(); getFeed();
}, []); }, []);
const loadingSpinner = loading ? (<Skeleton loading={true} active />) : null; const loadingSpinner = loading ? <Skeleton loading={true} active /> : null;
const noNews = !loading && feed.length === 0 ? (<div>No news.</div>) : null; const noNews = !loading && feed.length === 0 ? <div>No news.</div> : null;
return ( return (
<section className="news-feed form-module"> <section className="news-feed form-module">