mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-28 23:54:34 +00:00
Add the Next.js web app and shared lesson content.
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>
This commit is contained in:
parent
4708c69d9c
commit
f7470d333c
113 changed files with 25817 additions and 9 deletions
23
web/src/app/networks/year-1/[lesson]/page.tsx
Normal file
23
web/src/app/networks/year-1/[lesson]/page.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue