Skip to content

Commit

Permalink
- fixed problem with UI showing error that target from URL is not rec…
Browse files Browse the repository at this point in the history
…ognized when the targets are not yet loaded
  • Loading branch information
boriskovar-m2ms committed Dec 19, 2023
1 parent a70d4a2 commit c29b995
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/components/target/handleUnrecognisedTarget.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ const HandleUnrecognisedTarget = memo(({ targetUnrecognised, setTargetUnrecognis

if (targetUnrecognised === true) {
if (target_id_list && target_id_list.length === 0) {
modalBody = <h3>The target was not recognised and there are no other available targets.</h3>;
modalBody = <h3>Targets are loading. Please wait.</h3>;
} else {
modalBody = (
<Modal open={targetUnrecognised}>
<h3>
Target was not recognised or you do not have authentication to access target. <br />
Targets are loading. Please wait. <br />
</h3>
{request}
<TargetList key="TARGLIST" />
{/* <TargetList key="TARGLIST" />
<Button
color="primary"
onClick={() => {
Expand All @@ -56,7 +56,7 @@ const HandleUnrecognisedTarget = memo(({ targetUnrecognised, setTargetUnrecognis
style={{position: 'fixed', right: '25px'}}
>
Close
</Button>
</Button> */}
</Modal>
);
}
Expand All @@ -66,10 +66,10 @@ const HandleUnrecognisedTarget = memo(({ targetUnrecognised, setTargetUnrecognis
<Fragment>
<Modal open={targetUnrecognised !== undefined ? targetUnrecognised : false}>
{modalBody}
<Button color="primary" onClick={closeModal}>
{/* <Button color="primary" onClick={closeModal}>
Close
</Button>
<ErrorReport />
<ErrorReport /> */}
</Modal>
</Fragment>
);
Expand Down

0 comments on commit c29b995

Please sign in to comment.