Skip to content

Commit

Permalink
OCLOMRS-1035: Answers are not being displayed even the concepts are c…
Browse files Browse the repository at this point in the history
…oded: part2 (#735)

* Go back to source concepts page if no linked dictionary

* Commit suggestion from code review

Co-authored-by: Ian <52504170+ibacher@users.noreply.github.com>
  • Loading branch information
hadijahkyampeire and ibacher committed Aug 25, 2021
1 parent 570ca1c commit dafa184
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/apps/concepts/pages/ViewConceptPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ const ViewConceptPage: React.FC<Props> = ({
retrieveConcept(url);
}, [url, retrieveConcept]);

const fromDictionary = linkedDictionary ?? dictionaryToAddTo;
const backUrl = `${fromDictionary ? fromDictionary : conceptSource}concepts/`

return (
<>
<Header
Expand All @@ -63,7 +66,7 @@ const ViewConceptPage: React.FC<Props> = ({
? concept.display_name
: "View concept"
}
backUrl={linkedDictionary ? `${linkedDictionary}concepts/` : `${dictionaryToAddTo}concepts/` }
backUrl={backUrl}
>
<ProgressOverlay
delayRender
Expand Down

0 comments on commit dafa184

Please sign in to comment.