From 196ae87c86975a2c22d76e085a502a4a7eef8172 Mon Sep 17 00:00:00 2001 From: Hamid Roohi Date: Thu, 19 Dec 2024 11:33:42 +0330 Subject: [PATCH] fix(deployment error): try to fix prettycode error --- src/components/PrettyCode.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/PrettyCode.tsx b/src/components/PrettyCode.tsx index a553ccf..dbf433a 100644 --- a/src/components/PrettyCode.tsx +++ b/src/components/PrettyCode.tsx @@ -1,8 +1,10 @@ import { CSSProperties, useEffect, useRef } from "react"; -import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; +import { Prism, SyntaxHighlighterProps } from "react-syntax-highlighter"; // @ts-ignore import xonokai from "react-syntax-highlighter/dist/esm/styles/prism/xonokai.js"; +const SyntaxHighlighter = Prism as any as React.FC; + interface Props { language: "solidity" | "typescript" | "javascript" | "rust" | "go"; code: string;