mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
(feat:mermaid) dont pass isDarkTheme
This commit is contained in:
@@ -6,11 +6,12 @@ import { oneLight, vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/
|
||||
import { MermaidRendererProps } from './types';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { selectStatus } from '../conversation/conversationSlice';
|
||||
import { useDarkTheme } from '../hooks';
|
||||
|
||||
const MermaidRenderer: React.FC<MermaidRendererProps> = ({
|
||||
code,
|
||||
isDarkTheme,
|
||||
}) => {
|
||||
const [isDarkTheme] = useDarkTheme();
|
||||
const diagramId = useRef(`mermaid-${crypto.randomUUID()}`);
|
||||
const status = useSelector(selectStatus);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
@@ -26,5 +26,4 @@ export type InputProps = {
|
||||
|
||||
export type MermaidRendererProps = {
|
||||
code: string;
|
||||
isDarkTheme: boolean;
|
||||
};
|
||||
|
||||
@@ -490,7 +490,6 @@ const ConversationBubble = forwardRef<
|
||||
) : (
|
||||
<div className="my-4 w-full" style={{ minWidth: '100%' }}>
|
||||
<MermaidRenderer
|
||||
isDarkTheme={isDarkTheme}
|
||||
code={segment.content}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user