import { useEffect, useState } from "react"; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; import { a11yDark } from 'react-syntax-highlighter/dist/esm/styles/prism'; export const CodeSnippetlighter = () => { const [codeString, setCodeString] = useState(``) // // useEffect(()=>{ // fetch('/code.txt') // .then((r) => r.text()) // .then(text => { // setCodeString(text) // }) // }, []) return ( {codeString} ); };