This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(containers): Dashboard class to stateless function
chore(containers): Dashboard class to stateless function
- Loading branch information
Showing
2 changed files
with
36 additions
and
53 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
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 |
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 |
---|---|---|
@@ -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 |