Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Removed some useless GH calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jeluard committed Feb 19, 2021
1 parent 4cd76c3 commit 230ab9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions frontend/src/panels/admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ function Sessions({ client, conf, user }: { client: Client, conf: Configuration,
{errorMessage &&
<ErrorSnackbar open={true} message={errorMessage} onClose={() => setErrorMessage(null)} />}
<SessionCreationDialog allowUserSelection={true} client={client} conf={conf} sessions={resources} user={user} users={users} templates={templates} show={showCreationDialog} onCreate={(conf, id) => onCreate(conf, id, setSessions)} onHide={() => setShowCreationDialog(false)} />
{selected &&
{(selected && showUpdateDialog) &&
<SessionUpdateDialog id={selected} duration={resources[selected].duration} show={showUpdateDialog} onUpdate={(id, conf) => onUpdate(id, conf, setSessions)} onHide={() => setShowUpdateDialog(false)} />}
</>
)}
Expand Down Expand Up @@ -793,8 +793,9 @@ function Users({ client, user, conf }: { client: Client, user: LoggedUser, conf:
</TableContainer>
{errorMessage &&
<ErrorSnackbar open={true} message={errorMessage} onClose={() => setErrorMessage(null)} />}
<UserCreationDialog client={client} conf={conf} users={resources} show={showCreationDialog} onCreate={(id, conf) => onCreate(id, conf, setUsers)} onHide={() => setShowCreationDialog(false)} />
{selected &&
{showCreationDialog &&
<UserCreationDialog client={client} conf={conf} users={resources} show={showCreationDialog} onCreate={(id, conf) => onCreate(id, conf, setUsers)} onHide={() => setShowCreationDialog(false)} />}
{(selected && showUpdateDialog) &&
<UserUpdateDialog client={client} id={selected} user={resources[selected]} show={showUpdateDialog} onUpdate={(id, conf) => onUpdate(id, conf, setUsers)} onHide={() => setShowUpdateDialog(false)} />}
</>
)}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/panels/session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ function TemplateSelector({client, conf, user, templates, onDeployed, onRetry}:
</Container>
{errorMessage &&
<ErrorSnackbar open={true} message={errorMessage} onClose={() => setErrorMessage(null)} />}
<SessionCreationDialog client={client} user={user} template={selection[0]} conf={conf} templates={templates} show={openCustom} onCreate={onCreateClick} onHide={() => setOpenCustom(false)} />
{openCustom &&
<SessionCreationDialog client={client} user={user} template={selection[0]} conf={conf} templates={templates} show={openCustom} onCreate={onCreateClick} onHide={() => setOpenCustom(false)} />}
</>
);
} else {
Expand Down

0 comments on commit 230ab9a

Please sign in to comment.