mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
Move lessons out of the C sources into JSON so the web client can use the same material as the desktop app, and point release builds at desktop/. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
586 B
TypeScript
23 lines
586 B
TypeScript
import { notFound } from 'next/navigation';
|
|
|
|
import { getLesson, getLessonIds } from '@/content';
|
|
import { LessonScreen } from '@/components/LessonScreen';
|
|
|
|
export async function generateStaticParams() {
|
|
const ids = await getLessonIds('networks');
|
|
return ids.map((lesson) => ({ lesson }));
|
|
}
|
|
|
|
export default async function NetworkLessonPage({
|
|
params,
|
|
}: {
|
|
params: Promise<{ lesson: string }>;
|
|
}) {
|
|
const { lesson: id } = await params;
|
|
|
|
try {
|
|
return <LessonScreen lesson={await getLesson('networks', id)} backHref="/networks/year-1" />;
|
|
} catch {
|
|
notFound();
|
|
}
|
|
}
|