-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(performance): block nft and wallet routes until window.coins is …
…loaded
- Loading branch information
Showing
17 changed files
with
228 additions
and
134 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
42 changes: 21 additions & 21 deletions
42
packages/blockchain-wallet-v4-frontend/src/layouts/Nfts/Nfts.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
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
65 changes: 65 additions & 0 deletions
65
packages/blockchain-wallet-v4-frontend/src/scenes/Maintenance/Maintenance.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,65 @@ | ||
import React, { FunctionComponent } from 'react' | ||
import { Route } from 'react-router-dom' | ||
import styled from 'styled-components' | ||
|
||
import { Image, Text, TextGroup } from 'blockchain-info-components' | ||
|
||
const Wrapper = styled.div` | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
` | ||
const Row = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: flex-start; | ||
width: 100%; | ||
` | ||
const BlockchainLogoImage = styled(Image)` | ||
display: block; | ||
height: 25px; | ||
width: 200px; | ||
` | ||
const ErrorText = styled(Text)<{ hasHeader?: boolean }>` | ||
color: white; | ||
font-weight: 400; | ||
padding-top: ${({ hasHeader }) => (hasHeader ? '35vh' : '0px')}; | ||
` | ||
const BodyText = styled(TextGroup)` | ||
margin: 0 20px; | ||
text-align: center; | ||
` | ||
|
||
const Error = ({ hasHeader }: { hasHeader?: boolean }) => ( | ||
<Wrapper> | ||
<Row> | ||
<BodyText> | ||
<ErrorText size='18px' hasHeader> | ||
Sorry for the inconvenience but we’re performing some maintenance at the moment. | ||
We’ll be back online soon! | ||
</ErrorText> | ||
</BodyText> | ||
</Row> | ||
{!hasHeader && ( | ||
<Row style={{ marginTop: '60px' }}> | ||
<BlockchainLogoImage name='blockchain-logo' /> | ||
</Row> | ||
)} | ||
</Wrapper> | ||
) | ||
|
||
const Maintenance: FunctionComponent<{ path?: string }> = ({ path }) => { | ||
document.title = 'Blockchain.com Maintenance' | ||
|
||
if (path) { | ||
return <Route path={path} render={() => <Error />} /> | ||
} | ||
return <Error hasHeader /> | ||
} | ||
|
||
export default Maintenance |
1 change: 1 addition & 0 deletions
1
packages/blockchain-wallet-v4-frontend/src/scenes/Maintenance/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 './Maintenance' |
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.