diff --git a/src/components/DashboardPage.js b/src/components/DashboardPage.js index d7d96ecf..465f57a9 100644 --- a/src/components/DashboardPage.js +++ b/src/components/DashboardPage.js @@ -18,10 +18,9 @@ import { formatBTC } from 'helpers/format' import { getTotalBalance, getVisibleAccounts } from 'reducers/accounts' import Box, { Card } from 'components/base/Box' +import Pills from 'components/base/Pills' import Text from 'components/base/Text' import { AreaChart, BarChart } from 'components/base/Chart' -import Select from 'components/base/Select' -import Tabs from 'components/base/Tabs' const mapStateToProps: MapStateToProps<*, *, *> = state => ({ accounts: getVisibleAccounts(state), @@ -39,17 +38,18 @@ type Props = { } type State = { - tab: number, fakeDatas: Array, + selectedTime: string, } const ACCOUNTS_BY_LINE = 3 const TIMEOUT_REFRESH_DATAS = 5e3 const itemsTimes = [ - { key: 'week', name: 'Last week' }, - { key: 'month', name: 'Last month' }, - { key: 'year', name: 'Last year' }, + { key: 'day', label: 'Day' }, + { key: 'week', label: 'Week' }, + { key: 'month', label: 'Month' }, + { key: 'year', label: 'Year' }, ] const generateFakeData = v => ({ @@ -59,7 +59,7 @@ const generateFakeData = v => ({ class DashboardPage extends PureComponent { state = { - tab: 0, + selectedTime: 'day', fakeDatas: this.generateFakeDatas(), } @@ -107,13 +107,11 @@ class DashboardPage extends PureComponent { }, TIMEOUT_REFRESH_DATAS) } - handleChangeTab = tab => this.setState({ tab }) - _timeout = undefined render() { const { totalBalance, push, accounts } = this.props - const { tab, fakeDatas } = this.state + const { selectedTime, fakeDatas } = this.state const totalAccounts = accounts.length @@ -131,39 +129,17 @@ class DashboardPage extends PureComponent { -