Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
chore(containers): Dashboard class to stateless function
Browse files Browse the repository at this point in the history
chore(containers): Dashboard class to stateless function
  • Loading branch information
Metnew committed Nov 10, 2017
1 parent 56baaa0 commit 0bda3eb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 53 deletions.
52 changes: 25 additions & 27 deletions src/common/containers/Dashboard/components/index.jsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
// @flow
import React, {Component} from 'react'
import React from 'react'
import {Grid, Header} from 'semantic-ui-react'
import {FormattedMessage} from 'react-intl'

class DashboardComponent extends Component {
render () {
return (
<Grid columns={1}>
<Grid.Row centered>
<Grid.Column width={16}>
<Header as="h1">
<FormattedMessage id="Dashboard.h1" />
</Header>
<Header as="h2">
<FormattedMessage id="Dashboard.h2-1" />
</Header>
<p>
<FormattedMessage id="Dashboard.p-1" />
</p>
<Header as="h2">
<FormattedMessage id="Dashboard.h2-2" />
</Header>
<p>
<FormattedMessage id="Dashboard.p-2" />
</p>
</Grid.Column>
</Grid.Row>
</Grid>
)
}
const DashboardComponent = () => {
return (
<Grid columns={1}>
<Grid.Row centered>
<Grid.Column width={16}>
<Header as="h1">
<FormattedMessage id="Dashboard.h1" />
</Header>
<Header as="h2">
<FormattedMessage id="Dashboard.h2-1" />
</Header>
<p>
<FormattedMessage id="Dashboard.p-1" />
</p>
<Header as="h2">
<FormattedMessage id="Dashboard.h2-2" />
</Header>
<p>
<FormattedMessage id="Dashboard.p-2" />
</p>
</Grid.Column>
</Grid.Row>
</Grid>
)
}

export default DashboardComponent
37 changes: 11 additions & 26 deletions src/common/containers/Dashboard/index.jsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
// @flow
import React, {Component} from 'react'
import {connect} from 'react-redux'
import React from 'react'
import {Helmet} from 'react-helmet'
import DashboardComponent from './components'
import type {GlobalState} from 'reducers'

type Props = any

class Dashboard extends Component {
props: Props
render () {
return (
<div>
<Helmet>
<title>Suicrux:Dashboard</title>
</Helmet>
<DashboardComponent />
</div>
)
}
}

function mapStateToProps (state: GlobalState) {
return {}
}

function mapDispatchToProps (dispatch) {
return {}
const Dashboard = () => {
return (
<div>
<Helmet>
<title>Suicrux:Dashboard</title>
</Helmet>
<DashboardComponent />
</div>
)
}

export default connect(mapStateToProps, mapDispatchToProps)(Dashboard)
export default Dashboard

0 comments on commit 0bda3eb

Please sign in to comment.