46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import { GetStaticProps } from "next";
|
|
import React from "react";
|
|
|
|
import { Image } from "@/components/Image";
|
|
import { MiniTechTalkCard } from "@/components/MiniTechTalkCard";
|
|
import { getTechTalks, Metadata } from "@/lib/tech-talks";
|
|
|
|
import styles from "./tech-talks.module.css";
|
|
|
|
interface Props {
|
|
talks: Metadata[];
|
|
}
|
|
|
|
export default function TechTalks({ talks }: Props) {
|
|
return (
|
|
<>
|
|
<div className={styles.headerContainer}>
|
|
<section className={styles.header}>
|
|
<h1>Tech Talks</h1>
|
|
<p className={styles.headerContent}>
|
|
These are the audio and video recordings of past CSC and other
|
|
university-related talks. Our public events can also be found on our
|
|
YouTube channel.
|
|
</p>
|
|
</section>
|
|
<Image src="images/tech-talks.svg" className={styles.image} />
|
|
</div>
|
|
<div className={styles.miniCards}>
|
|
{talks.map((talk) => (
|
|
<MiniTechTalkCard
|
|
{...talk}
|
|
poster={talk.thumbnails.small}
|
|
key={talk.slug}
|
|
/>
|
|
))}
|
|
</div>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export const getStaticProps: GetStaticProps<Props> = async () => {
|
|
return {
|
|
props: { talks: (await getTechTalks()).map(({ metadata }) => metadata) },
|
|
};
|
|
};
|