mirror of
				https://github.com/DerTyp7/explainegy-nextjs.git
				synced 2025-10-31 13:47:11 +01:00 
			
		
		
		
	init
This commit is contained in:
		
							
								
								
									
										5
									
								
								app/tutorials/[tutorial]/ContentTable.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/tutorials/[tutorial]/ContentTable.tsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| import React from "react"; | ||||
|  | ||||
| export default function ContentTable() { | ||||
| 	return <div>ContentTable</div>; | ||||
| } | ||||
							
								
								
									
										5
									
								
								app/tutorials/[tutorial]/Sidebar.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/tutorials/[tutorial]/Sidebar.tsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| import React from "react"; | ||||
|  | ||||
| export default function Sidebar() { | ||||
| 	return <div>Sidebar</div>; | ||||
| } | ||||
							
								
								
									
										13
									
								
								app/tutorials/[tutorial]/layout.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								app/tutorials/[tutorial]/layout.tsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| import ContentTable from "./ContentTable"; | ||||
| import Sidebar from "./Sidebar"; | ||||
| import styles from "../../../styles/Tutorial.module.scss"; | ||||
|  | ||||
| export default function Layout({ children }: { children: React.ReactNode }) { | ||||
| 	return ( | ||||
| 		<div className={styles.tutorial}> | ||||
| 			<ContentTable /> | ||||
| 			<div className="tutorialContent">{children}</div> | ||||
| 			<Sidebar /> | ||||
| 		</div> | ||||
| 	); | ||||
| } | ||||
							
								
								
									
										20
									
								
								app/tutorials/[tutorial]/page.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								app/tutorials/[tutorial]/page.tsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| import { marked } from "marked"; | ||||
| export default async function Page({ | ||||
| 	params, | ||||
| }: { | ||||
| 	params: { tutorial: string }; | ||||
| }) { | ||||
| 	const requestData = await fetch(`http://127.0.0.1:3000/test.json`, { | ||||
| 		cache: "no-store", //! Just for dev | ||||
| 		/*next: {   revalidate: 10  }*/ | ||||
| 	}); | ||||
| 	const data = await requestData.json(); | ||||
|  | ||||
| 	return ( | ||||
| 		<div | ||||
| 			dangerouslySetInnerHTML={{ | ||||
| 				__html: marked.parse(data.markdown) ?? "", | ||||
| 			}} | ||||
| 		></div> | ||||
| 	); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Janis
					Janis