mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 21:02:13 +01:00
20 lines
475 B
TypeScript
20 lines
475 B
TypeScript
"use client";
|
|
import React from "react";
|
|
import { useEffect } from "react";
|
|
|
|
import Prism from "prismjs";
|
|
import "../../../styles/prism_themes/prism-one-dark.css";
|
|
//import "../../../styles/prism_themes/prism-one-light.css";
|
|
|
|
export default function LoadPrism() {
|
|
useEffect(() => {
|
|
document.querySelectorAll("pre").forEach((pre) => {
|
|
if (pre.classList.length < 1) {
|
|
pre.classList.add("language-");
|
|
}
|
|
});
|
|
Prism.highlightAll();
|
|
}, []);
|
|
return <div></div>;
|
|
}
|