mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 12:52:13 +01:00
27 lines
580 B
TypeScript
27 lines
580 B
TypeScript
import React from "react";
|
|
import { TutorialMeta } from "./page";
|
|
import styles from "../../../styles/TutorialContentTable.module.scss";
|
|
|
|
export default function ContentTable({
|
|
tutorialMeta,
|
|
}: {
|
|
tutorialMeta: TutorialMeta;
|
|
}) {
|
|
return (
|
|
<div className={styles.tutorialContentTable}>
|
|
<div className={styles.stickyContainer}>
|
|
<div className={styles.list}>
|
|
<h2>Contents</h2>
|
|
{tutorialMeta?.contentTable?.map((e, i) => {
|
|
return (
|
|
<a key={i} href={"#" + e.anchor}>
|
|
{e.title}
|
|
</a>
|
|
);
|
|
})}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|