Skip to content

Commit

Permalink
Merge pull request #28 from HDRUK/dev
Browse files Browse the repository at this point in the history
RDT3-236 - Fixing issue were logging in from CMS would not show the l…
  • Loading branch information
PaulMcCaffertyPA authored May 26, 2020
2 parents 475e23e + c5d39d9 commit b09ce6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/commonComponents/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ const LoginModal = (props) => {

useEffect(() => {
var values = queryString.parse(window.location.search);
if(!!values.showLogin) {
if(!!values.showLoginOnce && values.showLoginOnce === 'true') {
showLoginModal()

}

});
Expand Down
5 changes: 5 additions & 0 deletions src/pages/search/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ class SearchPage extends React.Component {
if (this.state.projectIndex > 0) searchURL += '&projectIndex=' + this.state.projectIndex;
if (this.state.personIndex > 0) searchURL += '&personIndex=' + this.state.personIndex;

if (queryString.parse(window.location.search).showLogin) {
searchURL += '&showLoginOnce=true';
}

if (!skipHistory) {
if (this.state.key) {
this.props.history.push(`${window.location.pathname}?search=${this.state.searchString}&tab=${this.state.key}` + searchURL);
Expand Down Expand Up @@ -245,6 +249,7 @@ class SearchPage extends React.Component {
handleSelect = (key) => {
this.setState({ key: key });
var values = queryString.parse(window.location.search);
if(!!values.showLoginOnce) values.showLoginOnce = false
values.tab = key;
this.props.history.push(window.location.pathname + '?' + queryString.stringify(values))
}
Expand Down

0 comments on commit b09ce6d

Please sign in to comment.