mirror of
				https://github.com/DerTyp7/explainegy-nextjs.git
				synced 2025-10-31 13:47:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			799 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			799 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import React from "react";
 | |
| import prisma from "../../../../lib/prisma";
 | |
| import styles from "../../../../styles/TutorialContentTable.module.scss";
 | |
| import { Article, ContentTableEntry } from "@prisma/client";
 | |
| 
 | |
| export default function ContentTable({
 | |
| 	contentTableEntries,
 | |
| }: {
 | |
| 	contentTableEntries: ContentTableEntry[];
 | |
| }) {
 | |
| 	return (
 | |
| 		<div className={styles.tutorialContentTable}>
 | |
| 			<div className={styles.stickyContainer}>
 | |
| 				<div className={styles.list}>
 | |
| 					<h2>Contents</h2>
 | |
| 					{contentTableEntries?.map((e, i) => {
 | |
| 						return (
 | |
| 							<a key={i} href={"#" + e.anchor}>
 | |
| 								{e.title}
 | |
| 							</a>
 | |
| 						);
 | |
| 					})}
 | |
| 				</div>
 | |
| 				{contentTableEntries?.length < 15 ? (
 | |
| 					<div className={styles.adContainer}>Future advertisement</div>
 | |
| 				) : (
 | |
| 					""
 | |
| 				)}
 | |
| 			</div>
 | |
| 		</div>
 | |
| 	);
 | |
| }
 | 
