Skip to content

Commit

Permalink
ui fix for mathjax
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanji86 committed Apr 22, 2024
1 parent 2948df4 commit 9e8c1fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,19 +328,14 @@ function App() {
}
}>Copy</button>} */}
{loading && <LoadingSkeleton />}
{result &&
<Badge variant="secondary"
className='mb-2 antialiased font-medium'
>
<FileIcon className="w-5 h-5 mr-1" />
Result</Badge>
}
{result &&
<DisplayTextResult text={result} onTextChange={handleTextChange} />
}

<MathJaxContext version={3} config={config}>
{(result && prompt=="Formula" ) && <DisplayLatex latex={result} />}
</MathJaxContext>
{result &&
<DisplayTextResult text={result} onTextChange={handleTextChange} />
}

</div>
</header>

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/displayLatex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react"
export default function displayLatexResult(props: { latex: string}) {

return (
<div className="grid w-full gap-2 min-h-60 pb-3 min-w-60">
<div className="grid w-full gap-2 pb-3 min-w-60">
<MathJax>
{props.latex}
</MathJax>
Expand Down

0 comments on commit 9e8c1fb

Please sign in to comment.