Skip to content

Commit 32ebc47

Browse files
committed
add
1 parent dc77c6f commit 32ebc47

File tree

5 files changed

+37
-134
lines changed

5 files changed

+37
-134
lines changed

pages/courses/index.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

pages/projects/index.tsx

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/app/layout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// src/app/layout.tsx
2+
import '../styles/globals.css';
3+
import type { ReactNode } from 'react';
4+
5+
export default function RootLayout({ children }: { children: ReactNode }) {
6+
return (
7+
<html lang="en">
8+
<body>{children}</body>
9+
</html>
10+
);
11+
}

src/app/projects/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import Link from 'next/link';
44
import Image from 'next/image';
55
import { getAllContent } from '@/lib/mdx';
66

7+
78
export default async function ProjectsPage() {
8-
const projects = await getAllContent('projects');
9+
const projects = (await getAllContent('projects')) || [];
910

1011
return (
1112
<div>
@@ -32,7 +33,7 @@ export default async function ProjectsPage() {
3233
}`}>
3334
{project.frontmatter.level}
3435
</span>
35-
{project.frontmatter.tags.map((tag: string) => (
36+
{(project.frontmatter.tags || []).map((tag: string) => (
3637
<span key={tag} className="px-2 py-1 text-xs bg-gray-100 text-gray-800 rounded-full">
3738
{tag}
3839
</span>

tsconfig.json

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -16,9 +20,23 @@
1620
"incremental": true,
1721
"baseUrl": ".",
1822
"paths": {
19-
"@/*": ["./src/*"]
20-
}
23+
"@/*": [
24+
"./src/*"
25+
]
26+
},
27+
"plugins": [
28+
{
29+
"name": "next"
30+
}
31+
]
2132
},
22-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
23-
"exclude": ["node_modules"]
33+
"include": [
34+
"next-env.d.ts",
35+
"**/*.ts",
36+
"**/*.tsx",
37+
".next/types/**/*.ts"
38+
],
39+
"exclude": [
40+
"node_modules"
41+
]
2442
}

0 commit comments

Comments
 (0)