Skip to content

Commit

Permalink
feat(ui-launcher): block launch button if cores info cannot be get
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Nov 29, 2023
1 parent ea188b1 commit 4267028
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/App/Studies/LauncherDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function LauncherDialog(props: Props) {
shallowEqual,
);

const cores = usePromiseWithSnackbarError(
const res = usePromiseWithSnackbarError(
() =>
getLauncherCores().then((cores) => {
setOptions((prevOptions) => {
Expand Down Expand Up @@ -199,7 +199,7 @@ function LauncherDialog(props: Props) {
sx={{ mx: 2 }}
color="primary"
variant="contained"
disabled={isLaunching}
disabled={isLaunching || !res.isResolved}
onClick={handleLaunchClick}
>
{t("global.launch")}
Expand Down Expand Up @@ -281,7 +281,7 @@ function LauncherDialog(props: Props) {
}}
/>
<UsePromiseCond
response={cores}
response={res}
ifResolved={(cores) => (
<TextField
id="nb-cpu"
Expand Down

0 comments on commit 4267028

Please sign in to comment.