Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 69dbb73

Browse files
author
plondon
committed
feat(New nav): add ad
1 parent 7a96d83 commit 69dbb73

4 files changed

Lines changed: 92 additions & 12 deletions

File tree

packages/blockchain-wallet-v4-frontend/src/data/analytics/model.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,7 @@ export const GENERAL_EVENTS = {
125125
VIEW_WHATS_NEW: ['general', 'view_whats_new'],
126126
VIEW_FAQ: ['general', 'view_faq']
127127
}
128+
129+
export const ADS_EVENTS = {
130+
CLICK_AD: ['navigation', 'click_ad']
131+
}

packages/blockchain-wallet-v4-frontend/src/layouts/Public/Header/LoginOrCreate/index.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
import React from 'react'
2+
import styled from 'styled-components'
23
import { contains } from 'ramda'
34
import { FormattedMessage } from 'react-intl'
45
import { withRouter } from 'react-router-dom'
56
import { LinkContainer } from 'react-router-bootstrap'
67
import { Button, Link, Text, TextGroup } from 'blockchain-info-components'
78
import media from 'services/ResponsiveService'
89

10+
const ResponsiveText = styled(Text)`
11+
font-size: 14px;
12+
${media.mobile`
13+
font-size: 12px;
14+
`}
15+
`
16+
const ResponsiveLink = styled(Link)`
17+
font-size: 14px;
18+
${media.mobile`
19+
font-size: 12px;
20+
`}
21+
`
22+
923
const LoginOrCreate = props => {
1024
const { pathname } = props.location
1125
const isSignup = contains('/signup', pathname)
1226
return (
1327
<LinkContainer to={isSignup ? '/login' : '/signup'}>
1428
<TextGroup inline>
15-
<Text size={media.mobile ? '12px' : '14px'} color='white' weight={500}>
29+
<ResponsiveText color='white' weight={500}>
1630
{isSignup ? (
1731
<FormattedMessage
1832
id='layouts.public.alreadyhave'
@@ -24,14 +38,13 @@ const LoginOrCreate = props => {
2438
defaultMessage="Don't have a wallet?"
2539
/>
2640
)}
27-
</Text>
41+
</ResponsiveText>
2842
<Button
2943
nature='white-transparent'
3044
style={{ minWidth: '42px', marginLeft: '8px', borderWidth: '2px' }}
3145
>
3246
{isSignup ? (
33-
<Link
34-
size={media.mobile ? '12px' : '14px'}
47+
<ResponsiveLink
3548
color='white'
3649
weight={600}
3750
data-e2e='signupLinkToLogin'
@@ -40,19 +53,14 @@ const LoginOrCreate = props => {
4053
id='layouts.public.login'
4154
defaultMessage='Log In'
4255
/>
43-
</Link>
56+
</ResponsiveLink>
4457
) : (
45-
<Link
46-
size={media.mobile ? '12px' : '14px'}
47-
color='white'
48-
weight={600}
49-
data-e2e='signupLink'
50-
>
58+
<ResponsiveLink color='white' weight={600} data-e2e='signupLink'>
5159
<FormattedMessage
5260
id='layouts.public.register'
5361
defaultMessage='Create One Now'
5462
/>
55-
</Link>
63+
</ResponsiveLink>
5664
)}
5765
</Button>
5866
</TextGroup>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import React from 'react'
2+
import styled from 'styled-components'
3+
import { bindActionCreators } from 'redux'
4+
import { connect } from 'react-redux'
5+
import { actions, model } from 'data'
6+
import { Button, Icon, Link, Text } from 'blockchain-info-components'
7+
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl'
8+
9+
const { ADS_EVENTS } = model.analytics
10+
11+
const Wrapper = styled.div`
12+
text-align: center;
13+
`
14+
const AdsButton = styled(Button)`
15+
margin: 8px auto 0px auto;
16+
span > span {
17+
color: ${props => props.theme['blue']};
18+
}
19+
`
20+
const ButtonText = styled(Text)`
21+
display: flex;
22+
white-space: nowrap;
23+
`
24+
const ArrowIcon = styled(Icon)`
25+
margin-left: 4px;
26+
`
27+
28+
const Footer = ({ actions }) => {
29+
return (
30+
<Wrapper>
31+
<Text color='gray-3' size='12px' weight={500}>
32+
<FormattedMessage
33+
id='layouts.wallet.menuleft.footer.ad'
34+
defaultMessage='Ad by bitcoin.com'
35+
/>
36+
</Text>
37+
<AdsButton
38+
height='48px'
39+
onClick={() => actions.logEvent(ADS_EVENTS.CLICK_AD)}
40+
>
41+
<Link
42+
href='https://games.bitcoin.com/videopoker?cma=201906_blockchainwallet&utm_campaign=201906_blockchainwallet&utm_source=blockchainwallet&utm_medium=banner'
43+
rel='noopener noreferrer'
44+
target='_blank'
45+
>
46+
<ButtonText color='gray-4' size='14px' weight={500}>
47+
<FormattedHTMLMessage
48+
id='layouts.wallet.menuleft.footer.bitcoingames'
49+
defaultMessage='Bitcoin Games. <span>Play Now</span>'
50+
/>
51+
<ArrowIcon name='short-right-arrow' color='blue' />
52+
</ButtonText>
53+
</Link>
54+
</AdsButton>
55+
</Wrapper>
56+
)
57+
}
58+
59+
const mapDispatchToProps = dispatch => ({
60+
actions: bindActionCreators(actions.analytics, dispatch)
61+
})
62+
63+
export default connect(
64+
null,
65+
mapDispatchToProps
66+
)(Footer)

packages/blockchain-wallet-v4-frontend/src/layouts/Wallet/MenuLeft/template.success.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
33
import styled from 'styled-components'
44

55
import Navigation from './Navigation'
6+
import Footer from './Footer'
67

78
export const Container = styled.div`
89
display: flex;
@@ -43,6 +44,7 @@ const MenuLeft = props => (
4344
<Container toggled={props.menuOpened}>
4445
<Overflow>
4546
<Navigation {...props} />
47+
<Footer />
4648
</Overflow>
4749
</Container>
4850
)

0 commit comments

Comments
 (0)