add comment & fix misc stuff
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
630a00f8bd
commit
215fbfa098
|
@ -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];
|
||||
|
||||
|
|
|
@ -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() } };
|
||||
|
|
Loading…
Reference in New Issue