-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: #1997 add redirect modal for legacy routes - marketplace
- Loading branch information
undefined
committed
Jul 12, 2020
1 parent
fd90c8e
commit ac87e80
Showing
6 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...ages/marketplace/src/components/pages/handle-legacy-routes/handle-legacy-routes-modal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import routes from '@/constants/routes' | ||
import { history } from '@/core/router' | ||
import React from 'react' | ||
import { Button, Modal } from '@reapit/elements' | ||
|
||
export const handleBtnBackToMarketplace = () => { | ||
history.push(routes.APPS) | ||
} | ||
|
||
export const handleBtnGoTherNow = () => { | ||
window.open(window.reapit.config.developerPortalUrl, '_self') | ||
} | ||
|
||
const HandleLegacyRoutesModal: React.FC<{}> = () => { | ||
return ( | ||
<Modal | ||
visible | ||
title="Looking for the developer portal?" | ||
footerItems={ | ||
<> | ||
<Button type="button" variant="primary" onClick={handleBtnGoTherNow}> | ||
Go there now | ||
</Button> | ||
<Button type="button" variant="primary" onClick={handleBtnBackToMarketplace}> | ||
Back to Marketplace | ||
</Button> | ||
</> | ||
} | ||
> | ||
The developer portal has permanently moved to https://developers.reapit.com Please remove any bookmarks to this | ||
page and in future visit the developer portal direct. Thankyou. | ||
</Modal> | ||
) | ||
} | ||
|
||
export default HandleLegacyRoutesModal |
1 change: 1 addition & 0 deletions
1
packages/marketplace/src/components/pages/handle-legacy-routes/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './handle-legacy-routes-modal' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters