mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-09 04:49:26 +00:00
Fix: fix sql component error in the web. (#1068)
Co-authored-by: 黄振洪 <hzh01509324@alibaba-inc.com> Co-authored-by: Aralhi <xiaoping0501@gmail.com>
This commit is contained in:
@@ -3,10 +3,11 @@ import { CopyOutlined } from '@ant-design/icons';
|
||||
import { oneDark, coldarkDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
|
||||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import { useColorScheme } from '@mui/joy';
|
||||
import { useContext } from 'react';
|
||||
import { ChatContext } from '@/app/chat-context';
|
||||
|
||||
export function CodePreview({ code, language }: { code: string; language: string }) {
|
||||
const { mode } = useColorScheme();
|
||||
const { mode } = useContext(ChatContext);
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
|
Reference in New Issue
Block a user