From 1eb863debe1308eb4cbb656f2779ef1b7581244a Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Wed, 1 Jan 2025 10:13:32 +0100 Subject: [PATCH] fix: add JSX syntax for Prism --- app/(root)/blog/[slug]/page.tsx | 1 + components/loader/prismLoader.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/app/(root)/blog/[slug]/page.tsx b/app/(root)/blog/[slug]/page.tsx index a84fc76..e1126d3 100644 --- a/app/(root)/blog/[slug]/page.tsx +++ b/app/(root)/blog/[slug]/page.tsx @@ -9,6 +9,7 @@ import { Metadata } from "next"; import { format } from "date-fns"; import Prism from "prismjs"; import "prismjs/components/prism-javascript"; +import "prismjs/components/prism-jsx"; import "prismjs/components/prism-python"; import "prismjs/components/prism-php"; import "prismjs/components/prism-bash"; diff --git a/components/loader/prismLoader.tsx b/components/loader/prismLoader.tsx index 73382b6..45525e4 100644 --- a/components/loader/prismLoader.tsx +++ b/components/loader/prismLoader.tsx @@ -3,6 +3,7 @@ import { useEffect } from "react"; import Prism from "prismjs"; import "prismjs/themes/prism-okaidia.css"; import "prismjs/components/prism-javascript"; +import "prismjs/components/prism-jsx"; import "prismjs/components/prism-python"; import "prismjs/components/prism-php"; import "prismjs/components/prism-bash";