From 42e616668882a550861ec10561cc210afade5717 Mon Sep 17 00:00:00 2001 From: Vladimir Metnev Date: Sat, 30 Sep 2017 14:39:27 +0300 Subject: [PATCH] feat(containers/Dashboard): add i18n for Dashboard component feat(containers/Dashboard): add i18n for Dashboard component --- .../containers/Dashboard/components/index.jsx | 44 +++++++------------ 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/src/common/containers/Dashboard/components/index.jsx b/src/common/containers/Dashboard/components/index.jsx index 854731a1..9f97ff79 100644 --- a/src/common/containers/Dashboard/components/index.jsx +++ b/src/common/containers/Dashboard/components/index.jsx @@ -1,39 +1,29 @@ // @flow import React, {Component} from 'react' -import {Card, Grid} from 'semantic-ui-react' -import _ from 'lodash' -import DashboardCardComponent from './DashboardCardComponent' -import type {PostItem} from 'types' - -type Props = { - posts: Object, - postsLoaded: boolean, - postsLoading: boolean, - count: number -} +import {Grid, Header} from 'semantic-ui-react' +import {FormattedMessage} from 'react-intl' export default class DashboardComponent extends Component { - props: Props - - shouldComponentUpdate (nextProps: Props) { - const {posts} = this.props - const nextPosts = nextProps.posts - return !_.isEqual(posts, nextPosts) - } - render () { - const {posts, postsLoaded} = this.props - return ( - {postsLoaded && - - {_.map(posts, (post: PostItem, i) => - - )} - } +
+ +
+
+ +
+

+ +

+
+ +
+

+ +