show play/stop button (#1804)

This commit is contained in:
CherryLiang 2019-10-30 00:44:39 +13:00 committed by Jaco Greeff
parent cf1e55050b
commit 3e6c61107b

View File

@ -180,7 +180,6 @@ function Playground ({ className, history, match: { params: { base64 } }, t }: P
};
const _runJs = async (): Promise<void> => {
setIsRunning(true);
_stopJs();
_clearConsole();
injectedRef.current = {
@ -207,6 +206,8 @@ function Playground ({ className, history, match: { params: { base64 } }, t }: P
// eslint-disable-next-line no-new-func
new Function('injected', exec)(injectedRef.current);
setIsRunning(false);
};
const _selectExample = (value: string): void => {
_stopJs();