svrjs-nextjs-website/components/loader/prismLoader.tsx

24 lines
656 B
TypeScript
Raw Normal View History

2024-08-26 18:20:10 +02:00
"use client";
import { useEffect } from "react";
import Prism from "prismjs";
import "prismjs/themes/prism-okaidia.css";
import "prismjs/components/prism-javascript";
import "prismjs/components/prism-python";
import "prismjs/components/prism-php";
import "prismjs/components/prism-javascript";
import "prismjs/components/prism-python";
import "prismjs/components/prism-php";
import "prismjs/components/prism-markup";
2024-08-26 18:20:10 +02:00
import "prismjs/components/prism-markup-templating";
import "prismjs/components/prism-handlebars";
2024-08-26 18:20:10 +02:00
export default function PrismLoader() {
useEffect(() => {
if (Prism) {
Prism.highlightAll();
}
}, []);
2024-08-26 18:20:10 +02:00
return null;
2024-08-26 18:20:10 +02:00
}