Skip to content
Snippets Groups Projects
Commit 94399b5b authored by Dongruixuan Li's avatar Dongruixuan Li
Browse files

fix editor bug

parent 099770d7
Branches
Tags v0.1.2
Loading
Pipeline #1589 passed
...@@ -11,7 +11,7 @@ export const Editor = React.memo(function Editor() { ...@@ -11,7 +11,7 @@ export const Editor = React.memo(function Editor() {
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const debouncedMarkdownRender = useMemo(() => _.debounce((x: string) => { const debouncedMarkdownRender = useMemo(() => _.debounce((x: string) => {
dispatch(changeStatement({title: currentStatementDetail.title, statement: x})) dispatch(changeStatement({title: currentStatementDetail.title, statement: x}))
}, 500), [currentStatementDetail.title]); }, 500), [currentStatementDetail.title, dispatch]);
return <React.Fragment> return <React.Fragment>
{currentStatementDetail.statementType === 'md' && {currentStatementDetail.statementType === 'md' &&
<Grid container spacing={2} style={{height: '100%'}}> <Grid container spacing={2} style={{height: '100%'}}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment