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

25 lines
692 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";
2024-09-08 13:31:40 +02:00
import "prismjs/components/prism-bash";
import "prismjs/components/prism-sql";
import "prismjs/components/prism-yaml";
import "prismjs/components/prism-markdown";
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
}