diff --git a/app/wiki/[...id]/page.tsx b/app/wiki/[...id]/page.tsx index 2054b3d..eeba67b 100644 --- a/app/wiki/[...id]/page.tsx +++ b/app/wiki/[...id]/page.tsx @@ -53,7 +53,7 @@ export async function generateMetadata({ params }: Props) { block.text.elements[0].text_run.content === "description") ) { // delete colon - description = block.text.elements[1].text_run.content.slice(1); + description = block.text.elements[1]?.text_run.content.slice(1); break; } } diff --git a/package-lock.json b/package-lock.json index 7974d8b..33ecf86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "lucide-react": "^0.408.0", "nanoid": "^5.0.7", "next": "14.2.4", + "next-themes": "^0.3.0", "prism-react-renderer": "^2.3.1", "prismjs": "^1.29.0", "react": "^18", @@ -4961,6 +4962,15 @@ } } }, + "node_modules/next-themes": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz", + "integrity": "sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==", + "peerDependencies": { + "react": "^16.8 || ^17 || ^18", + "react-dom": "^16.8 || ^17 || ^18" + } + }, "node_modules/next/node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",