Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
HM-4871: Front page redirection (#1029)
Browse files Browse the repository at this point in the history
* Create page to redirect to front page

* Redirect logged in user to front page when no redirect specified

* Update announcement banner link's target window
  • Loading branch information
dta-tyler authored May 3, 2022
1 parent 74a9163 commit 63ae034
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
6 changes: 1 addition & 5 deletions apps/marketplace/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ export class Header extends Component {
<div className="wrapper">
<div className="row">
<span className="maintenance-message">
Digital Marketplace is moving to BuyICT soon.{' '}
<a href="/api/2/r/buyict" target="_blank">
Find out more
</a>
.
Digital Marketplace is moving to BuyICT soon. <a href="/api/2/r/buyict">Find out more</a>.
</span>
</div>
</div>
Expand Down
13 changes: 13 additions & 0 deletions apps/marketplace/pages/BuyICTPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'
import LoadingIndicatorFullPage from 'shared/LoadingIndicatorFullPage/LoadingIndicatorFullPage'

const BuyICTPage = () => {
window.location.replace('/')
return (
<React.Fragment>
<LoadingIndicatorFullPage />
</React.Fragment>
)
}

export default BuyICTPage
2 changes: 1 addition & 1 deletion apps/marketplace/pages/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class LoginPageComponent extends BaseForm {

render() {
const { model, loggedIn, handleSubmit, currentlySending, isPartOfTeam, mustJoinTeam } = this.props
const { from } = this.props.location.state || { from: { pathname: `${rootPath}/opportunities` } }
const { from } = this.props.location.state || { from: { pathname: `${rootPath}/buyict` } }

if (loggedIn && !isPartOfTeam && mustJoinTeam) {
return <Redirect to={`${rootPath}/team/join`} />
Expand Down
2 changes: 2 additions & 0 deletions apps/marketplace/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import BuyerATMFlowPage from './pages/BuyerATMFlowPage'
import BuyerSpecialistCreatePage from './pages/BuyerSpecialistCreatePage'
import BuyerSpecialistCompletedPage from './pages/BuyerSpecialistCompletedPage'
import BuyerSpecialistFlowPage from './pages/BuyerSpecialistFlowPage'
import BuyICTPage from './pages/BuyICTPage'
import BriefOutcomeChoicePage from './pages/BriefOutcomeChoicePage'
import CloseOpportunityPage from './pages/CloseOpportunityPage'
import CloseOpportunitySuccessPage from './pages/CloseOpportunitySuccessPage'
Expand Down Expand Up @@ -232,6 +233,7 @@ export const Routes = () => (
path={`${rootPath}/seller-assessment/:evidenceId/:stage?`}
component={SellerAssessmentFlowPage}
/>
<Route path={`${rootPath}/buyict`} component={BuyICTPage} />
<Route component={NotFound} />
</Switch>
)
Expand Down
6 changes: 1 addition & 5 deletions src/bundles/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ class Header extends React.Component {
<div className="wrapper">
<div className="row">
<span className="maintenance-message">
Digital Marketplace is moving to BuyICT soon.{' '}
<a href="/api/2/r/buyict" target="_blank">
Find out more
</a>
.
Digital Marketplace is moving to BuyICT soon. <a href="/api/2/r/buyict">Find out more</a>.
</span>
</div>
</div>
Expand Down

0 comments on commit 63ae034

Please sign in to comment.