Skip to content

Instantly share code, notes, and snippets.

@adhithiravi
Created June 26, 2024 15:17
Show Gist options
  • Save adhithiravi/5dfdbc0d00d40ba07bc288fc73eb77fb to your computer and use it in GitHub Desktop.
Save adhithiravi/5dfdbc0d00d40ba07bc288fc73eb77fb to your computer and use it in GitHub Desktop.
Speaker information
export default async function Speaker({
params: { slug },
}: {
params: { slug: string };
}) {
const speakerInfo = await getSpeakerInfo(slug);
const { name, bio, id, sessions }: SpeakerWithSessions = speakerInfo;
return (
<section key={id} className={styles.infoContainer}>
<h3 className={styles.titleText}>{name}</h3>
<h5 className={styles.descText}>About: {bio}</h5>
{sessions &&
sessions.map(({ name, id }: SpeakerSummary) => (
<section key={id}>
<h5 className={styles.descText}>Session: {name}</h5>
</section>
))}
</section>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment