fix(client): open completionModal on shortcut (#42685)

This commit is contained in:
Shaun Hamilton
2021-06-30 15:58:49 +01:00
committed by Mrugesh Mohapatra
parent 36ad0dbcc5
commit de2f4e2843
2 changed files with 5 additions and 2 deletions

View File

@ -311,7 +311,7 @@ const Editor = (props: PropTypes): JSX.Element => {
/* eslint-disable no-bitwise */
keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter],
// TODO: Discuss with Ahmad what should pop-up when a challenge is completed
run: () => props.executeChallenge()
run: () => props.executeChallenge(true)
});
editor.addAction({
id: 'leave-editor',

View File

@ -44,6 +44,9 @@ function ToolPanel({
guideUrl,
videoUrl
}) {
const handleRunTests = () => {
executeChallenge(true);
};
const { t } = useTranslation();
return (
<Fragment>
@ -52,7 +55,7 @@ function ToolPanel({
isMobile ? 'tool-panel-group-mobile' : ''
}`}
>
<Button block={true} bsStyle='primary' onClick={executeChallenge}>
<Button block={true} bsStyle='primary' onClick={handleRunTests}>
{isMobile ? t('buttons.run') : t('buttons.run-test')}
</Button>
<Button