From 10016daad52e6d0bcaa8ef5b9149c9fbea943533 Mon Sep 17 00:00:00 2001 From: Yume <2839681263@qq.com> Date: Tue, 1 Jul 2025 17:38:51 +0800 Subject: [PATCH] fix(UI): fix code highlighting language error --- .../CodeView/BlobView/CodeContent.tsx | 2 +- .../web/pages/[org]/code/blob/[...path].tsx | 62 ------------------- 2 files changed, 1 insertion(+), 63 deletions(-) diff --git a/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx b/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx index e99512a8c..b6ad8fd4a 100644 --- a/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx +++ b/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx @@ -9,6 +9,7 @@ import 'github-markdown-css/github-markdown-light.css'; import styles from './CodeContent.module.css'; const suffixToLangMap: Record = { + '.js': 'jsx', '.jsx': 'jsx', '.tsx': 'tsx', '.kt': 'kotlin', @@ -186,7 +187,6 @@ const CodeContent = ({ fileContent, path }: { fileContent: string, path?: string - {/*todo: Dynamic support for language types*/} {({ style, tokens, getLineProps, getTokenProps }) => (
 item.name === currentFileName);
   }, [directory, new_path]);
 
-
-  const handleAddComment = (__content: string, __lineNumber?: number) => {
-    //wait for complete
-  }
-
-  const handleReplyComment = (__commentId: string, __content: string) => {
-    //wait for complete
-  }
-
-
   return (
     
@@ -135,10 +77,6 @@ function BlobPage() { - - {/* @ts-ignore */} - -