I am trying to use prismjs in my nextjs app for highlight my code block. But my code block not highlighting. here is my code:
I downlaoded prism.js and prism.css and added in my _app.js
_app.js
import "../styles/prism.js";
import "../styles/prism.css";
my blog page
import Prism from "Prismjs";
useEffect(() => {
const highlight = async () => {
await Prism.highlightAll(); // <--- prepare Prism
};
highlight(); // <--- call the async function
}, []); // <--- run when post updates