add comment & fix misc stuff
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Miniapple8888 2022-02-23 00:02:08 -05:00
parent 630a00f8bd
commit 215fbfa098
2 changed files with 2 additions and 5 deletions

View File

@ -17,7 +17,7 @@ export const NewsCard: React.FC<NewsCardProps> = ({
author,
children,
permalink,
fit = false,
fit = false, // resizes the article to fit the parent container if it's not a mini card
}) => {
const classes = fit ? [styles.card, styles.fit] : [styles.card];

View File

@ -38,9 +38,7 @@ export default function DateNews({ news }: Props) {
return (
<div className={styles.page}>
<Title>{["News", `${date}`]}</Title>
<h1>
News: <span>{date}</span>
</h1>
<h1>News: {date}</h1>
{news.map(({ content, metadata }, idx) => (
<NewsCard
key={idx}
@ -73,7 +71,6 @@ export const getStaticProps: GetStaticProps<Props, Params> = async (
const news = await Promise.all(
slugs.map((slug) => getNewsBySlug(year, term, slug))
);
console.log(slugs);
// Reverse so that we are displaying the most recent news
// of term first
return { props: { year, term, news: news.reverse() } };