Anastasia Poupeney
7 years ago
7 changed files with 174 additions and 76 deletions
@ -0,0 +1,58 @@ |
|||
// @flow
|
|||
|
|||
import React, { PureComponent } from 'react' |
|||
import { i } from 'helpers/staticPath' |
|||
import styled from 'styled-components' |
|||
import { connect } from 'react-redux' |
|||
import { compose } from 'redux' |
|||
import { translate } from 'react-i18next' |
|||
|
|||
import { openModal } from 'reducers/modals' |
|||
import type { T } from 'types/common' |
|||
import type { Account } from '@ledgerhq/live-common/lib/types' |
|||
|
|||
import { MODAL_RECEIVE } from 'config/constants' |
|||
|
|||
import Box from 'components/base/Box' |
|||
import Button from 'components/base/Button' |
|||
import { Title, Description } from 'components/DashboardPage/EmptyState' |
|||
import IconReceive from 'icons/Receive' |
|||
|
|||
const mapDispatchToProps = { |
|||
openModal, |
|||
} |
|||
|
|||
type Props = { |
|||
t: T, |
|||
account: Account, |
|||
openModal: Function, |
|||
} |
|||
|
|||
class EmptyStateAccount extends PureComponent<Props, *> { |
|||
render() { |
|||
const { t, account, openModal } = this.props |
|||
|
|||
return ( |
|||
<Box mt={7} alignItems="center"> |
|||
<img |
|||
alt="emptyState Dashboard logo" |
|||
src={i('logos/emptyStateAccount.png')} |
|||
width="400" |
|||
height="89" |
|||
/> |
|||
<Box mt={5} alignItems="center"> |
|||
<Title>{t('account:emptyState.title')}</Title> |
|||
<Description>{t('account:emptyState.desc')}</Description> |
|||
<Button mt={3} padded primary onClick={() => openModal(MODAL_RECEIVE, { account })}> |
|||
<Box horizontal flow={1} alignItems="center"> |
|||
<IconReceive size={12} /> |
|||
<Box>{t('account:emptyState.buttons.receiveFunds')}</Box> |
|||
</Box> |
|||
</Button> |
|||
</Box> |
|||
</Box> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default compose(connect(null, mapDispatchToProps), translate())(EmptyStateAccount) |
@ -0,0 +1,16 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
|
|||
const path = ( |
|||
<path |
|||
fill="currentColor" |
|||
d="M12.541 4.432l1.51-1.51a.697.697 0 0 1 1.1.152c.94 1.67.744 3.259-.575 4.577-1.153 1.154-2.565 1.502-4.127 1.02a.232.232 0 0 0-.233.057L3.71 15.234a2.09 2.09 0 1 1-2.955-2.956L7.26 5.772c.06-.06.083-.15.057-.232-.483-1.562-.134-2.974 1.02-4.128C9.655.094 11.244-.1 12.914.838a.697.697 0 0 1 .15 1.1l-1.509 1.51.165.82.82.164zM1.74 14.25a.697.697 0 0 0 .985 0l6.506-6.506a1.625 1.625 0 0 1 1.63-.404c1.068.33 1.942.115 2.73-.673.63-.63.862-1.277.702-2.015l-.854.854a1.161 1.161 0 0 1-1.049.318l-1.095-.22a1.161 1.161 0 0 1-.91-.91l-.22-1.094a1.168 1.168 0 0 1 .318-1.05l.855-.854c-.738-.16-1.386.073-2.016.702-.787.788-1.003 1.662-.673 2.73a1.625 1.625 0 0 1-.403 1.63L1.74 13.264a.697.697 0 0 0 0 .986z" |
|||
/> |
|||
) |
|||
|
|||
export default ({ size, ...p }: { size: number }) => ( |
|||
<svg viewBox="0 0 16 16" height={size} width={size} {...p}> |
|||
{path} |
|||
</svg> |
|||
) |
After Width: | Height: | Size: 8.9 KiB |
Loading…
Reference in new issue