forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from nijil-deriv/nijil/wall-3711/wallets-route…
…-update Nijil/wall 3711/wallets route update
- Loading branch information
Showing
83 changed files
with
404 additions
and
1,512 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
packages/appstore/src/modules/Page404/Components/Page404.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,20 @@ | ||
import React from 'react'; | ||
import { PageError } from '@deriv/components'; | ||
import { routes, getUrlBase } from '@deriv/shared'; | ||
import { localize } from '@deriv/translations'; | ||
|
||
const Page404 = () => ( | ||
<PageError | ||
header={localize('We couldn’t find that page')} | ||
messages={[ | ||
localize('You may have followed a broken link, or the page has moved to a new address.'), | ||
localize('Error code: {{error_code}} page not found', { error_code: 404 }), | ||
]} | ||
redirect_urls={[routes.traders_hub]} | ||
redirect_labels={[localize("Return to Trader's Hub")]} | ||
classNameImage='page-404__image' | ||
image_url={getUrlBase('/public/images/common/404.png')} | ||
/> | ||
); | ||
|
||
export default Page404; |
19 changes: 19 additions & 0 deletions
19
packages/appstore/src/modules/Page404/Components/__tests__/Page404.spec.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,19 @@ | ||
import React from 'react'; | ||
import { Router } from 'react-router'; | ||
import { createBrowserHistory } from 'history'; | ||
import { render, screen } from '@testing-library/react'; | ||
import Page404 from '../Page404'; | ||
|
||
describe('Page404', () => { | ||
const browser_history = createBrowserHistory(); | ||
|
||
it('should render Page404', () => { | ||
render( | ||
<Router history={browser_history}> | ||
<Page404 /> | ||
</Router> | ||
); | ||
|
||
expect(screen.getByText('We couldn’t find that page')).toBeInTheDocument(); | ||
}); | ||
}); |
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,3 @@ | ||
import Page404 from './Components/Page404'; | ||
|
||
export default Page404; |
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
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
Oops, something went wrong.