index.tsx 18.8 KB
Newer Older
Maxym Borodenko's avatar
Maxym Borodenko committed
1
2
3
import * as React from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
Matija Obreza's avatar
Matija Obreza committed
4
import {withStyles} from '@material-ui/core/styles';
Maxym Borodenko's avatar
Maxym Borodenko committed
5
6
import { translate } from 'react-i18next';

7
// import { navigateTo } from 'actions/navigation';
Oleksii Savran's avatar
Oleksii Savran committed
8
9
10
11
12
// Actions
import { loadLastNews } from 'cms/actions/public';

// Models
import ActivityPost from 'model/cms/ActivityPost';
Maxym Borodenko's avatar
Maxym Borodenko committed
13
14

import ContentHeader from 'ui/common/heading/ContentHeader';
Matija Obreza's avatar
Matija Obreza committed
15
import Grid from '@material-ui/core/Grid';
16
import Markdown from 'ui/common/markdown';
Maxym Borodenko's avatar
Maxym Borodenko committed
17
import { Link } from 'react-router-dom';
Matija Obreza's avatar
Matija Obreza committed
18
19
20
21
22
23
24
import Input from '@material-ui/core/Input';
import InputAdornment from '@material-ui/core/InputAdornment';
import IconButton from '@material-ui/core/IconButton';
import Hidden from '@material-ui/core/Hidden';
import RecordVoiceOverIcon from '@material-ui/icons/RecordVoiceOver';
import MailOutlineIcon from '@material-ui/icons/MailOutline';
import BookmarkBorderIcon from '@material-ui/icons/BookmarkBorder';
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
25
import PageLayout, { PageContents } from 'ui/layout/PageLayout';
26
import Number from 'ui/common/Number';
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
27
import GridContainer from 'ui/layout/GridContainer';
Oleksii Savran's avatar
Oleksii Savran committed
28
import CropCard from 'crop/ui/c/CropCard';
Oleksii Savran's avatar
Oleksii Savran committed
29
import ActivityPostCard from 'cms/ui/c/ActivityPostCard';
Maxym Borodenko's avatar
Maxym Borodenko committed
30
31
32

const styles = (theme) => ({
    /* tslint:disable */
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
33
34
35
36
37
38
    root: {
      [theme.breakpoints.down('sm')]: {
        display: 'initial' as 'initial',
        position: 'initial'as 'initial',
      },
    },
Matija Obreza's avatar
Matija Obreza committed
39
    backgroundImageWrapper:{
Maxym Borodenko's avatar
Maxym Borodenko committed
40
41
42
43
        marginTop:'-25%',
    },
    backgroundImage: {
        top: '-50%',
Matija Obreza's avatar
Matija Obreza committed
44
        display: 'block' as 'block',
Maxym Borodenko's avatar
Maxym Borodenko committed
45
        marginBottom: '-100%',
Maxym Borodenko's avatar
Maxym Borodenko committed
46
        [theme.breakpoints.down('sm')]: {
Maxym Borodenko's avatar
Maxym Borodenko committed
47
48
49
50
51
52
53
54
55
            minWidth: '1000px',
            width:'110%',
            marginTop:'0px',
        },
    },
    background: {
        overflow: 'hidden' as 'hidden',
    },
    searchBox: {
Matija Obreza's avatar
Matija Obreza committed
56
        textAlign: 'center' as 'center',
Maxym Borodenko's avatar
Maxym Borodenko committed
57
        padding: '6.857rem 0 5.714rem 0',
Maxym Borodenko's avatar
Maxym Borodenko committed
58
        [theme.breakpoints.down('sm')]: {
Maxym Borodenko's avatar
Maxym Borodenko committed
59
60
61
62
            padding: '4.857rem 0 2.714rem 0',
        },
    },
    searchWrapper: {
Maxym Borodenko's avatar
Maxym Borodenko committed
63
64
65
66
67
68
69
70
        width: '56%',
        margin: '0 auto',
        border: '5px solid rgba(0, 0, 0, 0.4)',
        borderRight: '9px solid rgba(0, 0, 0, 0.4)',
        borderRadius: '10px',
        [theme.breakpoints.down('sm')]: {
           width: '88%',
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
71
72
    },
    searchField: {
Maxym Borodenko's avatar
Maxym Borodenko committed
73
74
75
76
77
78
79
80
        width: '100%',
        background: 'rgba(255, 255, 255, 0.9)',
        border: '2px solid #000',
        borderRadius: '4px',
        '& input': {
            paddingLeft: '1.429rem',
            fontSize: '1.286rem',
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
81
82
    },
    searchButton: {
Maxym Borodenko's avatar
Maxym Borodenko committed
83
84
85
        background: '#0b6eb5',
        padding: '0 1.143rem',
        maxHeight: 'none',
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
86
        height: 'initial',
Maxym Borodenko's avatar
Maxym Borodenko committed
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
        outline: '2px solid #0b6eb5',
        '& button': {
            width: 'auto',
            verticalAlign: 'middle',
            color: '#fff',
            '&:hover': {
                backgroundColor: 'transparent' as 'transparent',
            }
        },
        '& img': {
            width: '24px',
            height: '24px',
        },
        '& span.search': {
            margin: '0 .5rem',
            fontSize: '1.286rem',
            [theme.breakpoints.down('sm')]: {
                display: 'none' as 'none',
            },
Maxym Borodenko's avatar
Maxym Borodenko committed
106
        },
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
107
108
109
        'html[dir="rtl"] &': {
         marginLeft: 0,
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
110
111
    },
    statsWrapper: {
Maxym Borodenko's avatar
Maxym Borodenko committed
112
        marginBottom: '2.857rem',
Maxym Borodenko's avatar
Maxym Borodenko committed
113
114
    },
    statsContainer: {
Maxym Borodenko's avatar
Maxym Borodenko committed
115
116
117
118
119
        width: '56%',
        margin: '0 auto',
        [theme.breakpoints.down('sm')]: {
            width: '72%',
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
120
121
    },
    stats: {
Maxym Borodenko's avatar
Maxym Borodenko committed
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
        padding: '0 1.429rem',
        height: '4.857rem',
        display: 'flex' as 'flex',
        background: 'rgba(0, 0, 0, 0.6)',
        border: '2px solid rgba(255, 255, 255, 0.8)',
        alignItems: 'center' as 'center',
        '& a': {
            color: '#88ba42',
        },
        [theme.breakpoints.down('sm')]: {
            justifyContent: 'center' as 'center',
            height: '3rem',
            '& a': {
                color: '#fff',
            },
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
138
139
    },
    amount: {
Maxym Borodenko's avatar
Maxym Borodenko committed
140
141
142
143
        display: 'block' as 'block',
        fontSize: '2.143rem',
        fontWeight: 'bold' as 'bold',
        color: '#fff',
144
145
146
        [theme.breakpoints.down('md')]: {
            fontSize: '1.4rem',
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
147
148
149
150
151
152
    },
    aboutBox: {
        position: 'relative' as 'relative',
        width: '100%',
        background: 'rgba(0, 0, 0, 0.6)',
        color: '#fff',
Matija Obreza's avatar
Matija Obreza committed
153
        textAlign: 'center' as 'center',
Maxym Borodenko's avatar
Maxym Borodenko committed
154
155
156
157
158
159
        '& .markdown p': {
            fontSize: '1.143rem',
            lineHeight: '3.071rem',
            width: '80%',
            margin: '0 auto',
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
160
161
162
163
164
165
166
167
168
        [theme.breakpoints.down('sm')]: {
            padding: '1rem 0',
            '& .markdown p': {
                paddingBottom: '0.5rem',
                fontSize: '1.286rem',
                fontWeight: 'bold' as 'bold',
                lineHeight: '1.75rem',
            },
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
169
170
171
172
173
174
175
176
177
178
179
180
    },
    plus: {
        position: 'absolute' as 'absolute',
        top: '8px',
        right: '16px',
        width: '24px',
        lineHeight: '24px',
        background: '#88ba42',
        borderRadius: '50%',
        fontSize: '1.286rem',
        fontWeight: 'bold' as 'bold',
        cursor: 'pointer',
Maxym Borodenko's avatar
Maxym Borodenko committed
181
182
183
        [theme.breakpoints.down('sm')]: {
            position: 'static' as 'static',
            margin: '0 auto',
Maxym Borodenko's avatar
Maxym Borodenko committed
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
        },
    },
    moreStuffWrapper: {
        backgroundColor: '#e7e5df',
        paddingTop: '2.14rem',
    },
    moreStuff: {
        width: '60%',
        margin: '0 auto',
        '& > div': {
            borderLeft: '1px solid #2b2924',
        },
        '& > div:last-child': {
            borderRight: '1px solid #2b2924',
        },
Maxym Borodenko's avatar
Maxym Borodenko committed
199
200
201
        [theme.breakpoints.down('sm')]: {
            width: '90%',
            color: '#8fc848',
Maxym Borodenko's avatar
Maxym Borodenko committed
202

Maxym Borodenko's avatar
Maxym Borodenko committed
203
204
205
            '& > div': {
                border: 'none',
                borderBottom: '1px solid #2b2924',
Maxym Borodenko's avatar
Maxym Borodenko committed
206
                padding: '1rem 0',
Maxym Borodenko's avatar
Maxym Borodenko committed
207
            },
Maxym Borodenko's avatar
Maxym Borodenko committed
208
209
210
211
212
213
214
            '& > div:last-child': {
                border: 'none',
            },
        },
    },
    infoBox: {
        padding: '.5rem',
Matija Obreza's avatar
Matija Obreza committed
215
        display: 'flex' as 'flex',
Maxym Borodenko's avatar
Maxym Borodenko committed
216
217
218
219
        alignItems: 'center' as 'center',
        justifyContent: 'center' as 'center',
        '& span': {
            marginRight: '1rem',
Maxym Borodenko's avatar
Maxym Borodenko committed
220
            '& img': {
Maxym Borodenko's avatar
Maxym Borodenko committed
221
222
                width: '40px',
                height: '40px',
Maxym Borodenko's avatar
Maxym Borodenko committed
223
            },
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
224
225
226
            'html[dir="rtl"] &': {
                marginLeft: '1rem',
            },
Maxym Borodenko's avatar
Maxym Borodenko committed
227
228
229
230
231
232
233
234
235
        },
        '& p': {
            margin: 0,
            fontSize: '1.071rem',
        },
    },
    /* tslint:enable */
});

236
const SEARCH_SUGGESTIONS_COUNT = 7;
Maxym Borodenko's avatar
Maxym Borodenko committed
237

238
239
240
241
242
interface IWelcomeProps {
    t?: any;
    classes?: any;
    serverInfo: any;
    crops: any;
Oleksii Savran's avatar
Oleksii Savran committed
243
244
    lastNews: ActivityPost[];
    loadLastNews: () => ActivityPost[];
245
246
247
}

class WelcomePage extends React.Component<IWelcomeProps, any> {
Maxym Borodenko's avatar
Maxym Borodenko committed
248

249
250
251
252
    protected static needs = [
        () => loadLastNews(),
    ];

Maxym Borodenko's avatar
Maxym Borodenko committed
253
254
255
    constructor(props: any, context: any) {
        super(props, context);
        const { t } = props;
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
256
        this.state = { query: '', queryPlaceholder: t('public.p.welcome.search.placeholder') };
Maxym Borodenko's avatar
Maxym Borodenko committed
257
258
    }

Oleksii Savran's avatar
Oleksii Savran committed
259
260
261
262
263
264
265
    public componentWillMount() {
        const { loadLastNews, lastNews } = this.props;
        if (!lastNews) {
            loadLastNews();
        }
    }

Maxym Borodenko's avatar
Maxym Borodenko committed
266
    public render() {
Oleksii Savran's avatar
Oleksii Savran committed
267
        const { classes, t, serverInfo, crops, lastNews } = this.props;
Maxym Borodenko's avatar
Maxym Borodenko committed
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289

        const Stats = ({children}) => (
            <div className={ classes.stats }>
                { children }
            </div>
        );

        const InfoBox = ({children}) => (
            <div className={ classes.infoBox }>
                { children }
            </div>
        );

        const searchQueryChange = (e) => {
            this.setState({
                ...this.state,
                query: e.target.value,
            });
        };


        const onSubmitSearch = (e) => {
290
          const { query } = this.state;
Maxym Borodenko's avatar
Maxym Borodenko committed
291
          // const { navigateTo, t } = this.props;
292
293
294
295
296
297
          e.preventDefault();
          if (query && query.length > 0) {
            // navigateTo(`/datasets/suggest`, { q: query });
          } else {
            this.setState({
              ...this.state,
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
298
              queryPlaceholder: t(`public.p.welcome.search.suggestion${Math.floor(Math.random() * SEARCH_SUGGESTIONS_COUNT)}`),
299
300
            });
          }
Maxym Borodenko's avatar
Maxym Borodenko committed
301
302
303
        };

        return (
Oleksii Savran's avatar
Oleksii Savran committed
304
            <PageLayout classes={ {root: classes.root } } withFooter>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
305
                <ContentHeader title={ t('common.Genesys PGR') } />
Maxym Borodenko's avatar
Maxym Borodenko committed
306
307
308
                <Grid container spacing={ 0 } className={ classes.background }>
                    <div  className={ classes.backgroundImageWrapper }>
                        <img className={ classes.backgroundImage } srcSet="
309
310
311
                            images/entrypage1x.jpg 1000w,
                            images/entrypage2x.jpg 2000w,
                            images/entrypage4x.jpg 4000w "
Maxym Borodenko's avatar
Maxym Borodenko committed
312
313
314
315
316
317
318
319
                        />
                    </div>
                    <Grid item xs={ 12 }>
                        <div className={ classes.searchBox }>
                            <form onSubmit={ onSubmitSearch }>
                                <div className={ classes.searchWrapper }>
                                    <Input type="text" onChange={ searchQueryChange } className={ classes.searchField }
                                        disableUnderline
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
320
                                        placeholder={ t(this.state.queryPlaceholder) }
Maxym Borodenko's avatar
Maxym Borodenko committed
321
322
323
                                        endAdornment={
                                            <InputAdornment position="end" className={ classes.searchButton }>
                                                <IconButton type="button" onClick={ onSubmitSearch }>
324
                                                    <img src="images/ICON-SEARCH.svg" alt=""/>
Maxym Borodenko's avatar
Maxym Borodenko committed
325
326
327
328
329
330
331
332
333
334
335
                                                    <span className="search">{ t('common:action.search') }</span>
                                                </IconButton>
                                            </InputAdornment>
                                        }
                                    />
                                </div>
                            </form>
                        </div>
                    </Grid>
                    <Grid item xs={ 12 } className={ classes.statsWrapper }>
                        <Grid container spacing={ 16 } className={ classes.statsContainer }>
336
337
338
339
340
                            <Hidden smDown>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
                                        <Link to="/a/">
                                            <span className={ classes.amount }><Number value={ serverInfo.accessionCount } /></span>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
341
                                            { t('accessions.common.stats', { count: serverInfo.accessionCount }) }
342
343
344
345
346
347
348
                                        </Link>
                                    </Stats>
                                </Grid>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
                                        <Link to="/subsets">
                                            <span className={ classes.amount }><Number value={ serverInfo.subsetCount } /></span>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
349
                                            { t('subsets.common.stats', { count: serverInfo.subsetCount }) }
350
351
352
                                        </Link>
                                    </Stats>
                                </Grid>
Maxym Borodenko's avatar
Maxym Borodenko committed
353
354
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
355
                                        <Link to="/datasets">
356
                                            <span className={ classes.amount }><Number value={ serverInfo.datasetCount } /></span>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
357
                                            { t('datasets.common.stats', { count: serverInfo.datasetCount }) }
358
359
360
361
362
363
364
                                        </Link>
                                    </Stats>
                                </Grid>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
                                        <Link to="/wiews">
                                            <span className={ classes.amount }><Number value={ serverInfo.instituteCount } /></span>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
365
                                            { t('institutes.common.stats', { count: serverInfo.instituteCount }) }
Maxym Borodenko's avatar
Maxym Borodenko committed
366
367
368
369
370
371
372
                                        </Link>
                                    </Stats>
                                </Grid>
                            </Hidden>
                            <Hidden mdUp>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
Matija Obreza's avatar
Matija Obreza committed
373
                                        <Link to="/a/">
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
374
                                            { t('accessions.common.stats', { count: serverInfo.accessionCount }) }
375
376
377
378
379
380
                                        </Link>
                                    </Stats>
                                </Grid>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
                                        <Link to="/subsets">
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
381
                                            { t('subsets.common.stats', { count: serverInfo.subsetCount }) }
382
383
384
385
386
                                        </Link>
                                    </Stats>
                                </Grid>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
387
                                        <Link to="/datasets">
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
388
                                            { t('datasets.common.stats', { count: serverInfo.datasetCount }) }
389
390
391
392
393
394
                                        </Link>
                                    </Stats>
                                </Grid>
                                <Grid item xs={ 12 } md={ 3 }>
                                    <Stats>
                                        <Link to="/wiews">
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
395
                                            { t('institutes.common.stats', { count: serverInfo.instituteCount }) }
Maxym Borodenko's avatar
Maxym Borodenko committed
396
397
398
399
400
401
402
                                        </Link>
                                    </Stats>
                                </Grid>
                            </Hidden>
                        </Grid>
                    </Grid>
                    <div className={ classes.aboutBox }>
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
403
                        <Markdown source={
Maxym Borodenko's avatar
Maxym Borodenko committed
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
                                `
The Genesys Catalog enables genebanks around the world to
share caracterization and evaluation information on material held in their collections.
`
                            } />
                        <div className={ classes.plus }>
                            +
                        </div>
                    </div>
                    <Grid item xs={ 12 } className={ classes.moreStuffWrapper }>
                        <Grid container spacing={ 0 } className={ classes.moreStuff }>
                            <Grid item xs={ 12 } md={ 4 }>
                                <InfoBox>
                                    <Hidden mdUp>
                                        <span>
                                            <RecordVoiceOverIcon color="primary"/>
                                        </span>
                                    </Hidden>
                                    <Hidden mdDown>
                                        <span>
424
                                            <img src="images/ICON-CONTRIBUTE.svg" alt=""/>
Maxym Borodenko's avatar
Maxym Borodenko committed
425
426
                                        </span>
                                    </Hidden>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
427
                                    <p className="font-bold">{ t('public.p.welcome.Contribute to Genesys') }</p>
Maxym Borodenko's avatar
Maxym Borodenko committed
428
429
430
431
432
433
434
435
436
437
438
                                </InfoBox>
                            </Grid>
                            <Grid item xs={ 12 } md={ 4 }>
                                <InfoBox>
                                    <Hidden mdUp>
                                        <span>
                                            <MailOutlineIcon color="primary"/>
                                        </span>
                                    </Hidden>
                                    <Hidden mdDown>
                                        <span>
439
                                            <img src="images/ICON-SUBSCRIBE.svg" alt=""/>
Maxym Borodenko's avatar
Maxym Borodenko committed
440
441
                                        </span>
                                    </Hidden>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
442
                                    <p className="font-bold">{ t('public.p.welcome.Subscribe to Newsletter') }</p>
Maxym Borodenko's avatar
Maxym Borodenko committed
443
444
445
446
447
448
449
450
                                </InfoBox>
                            </Grid>
                            <Grid item xs={ 12 } md={ 4 }>
                                <InfoBox>
                                    <Hidden mdUp>
                                        <span>
                                            <BookmarkBorderIcon color="primary"/>
                                        </span>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
451
                                        <p className="font-bold">{ t('public.p.welcome.Bookmark this page') }</p>
Maxym Borodenko's avatar
Maxym Borodenko committed
452
453
454
                                    </Hidden>
                                    <Hidden mdDown>
                                        <span>
455
                                            <img src="images/ICON-ABOUT.svg" alt=""/>
Maxym Borodenko's avatar
Maxym Borodenko committed
456
                                        </span>
Viacheslav Pavlov's avatar
i18n    
Viacheslav Pavlov committed
457
                                        <p className="font-bold">{ t('public.p.welcome.About Genesys PGR') }</p>
Maxym Borodenko's avatar
Maxym Borodenko committed
458
459
460
461
462
463
                                    </Hidden>
                                </InfoBox>
                            </Grid>
                        </Grid>
                    </Grid>
                </Grid>
Oleksii Savran's avatar
Oleksii Savran committed
464
465
466
467
468
469
470
471
472
                <Grid item xs={ 12 }>
                  { lastNews &&
                  <PageContents className="pt-1rem">
                    <GridContainer>
                      { lastNews.map((post) => <ActivityPostCard key={ post.id } post={ post } />) }
                    </GridContainer>
                  </PageContents>
                  }
                </Grid>
Oleksii Savran's avatar
Oleksii Savran committed
473
474
                <Grid item xs={ 12 }>
                    { crops &&
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
475
476
477
478
479
                    <PageContents className="pt-1rem">
                            <GridContainer>
                                { crops && crops.sort((a, b) => a.name.localeCompare(b.name)).map((crop) => <CropCard key={ crop.shortName } crop={ crop } compact />) }
                            </GridContainer>
                        </PageContents>
Oleksii Savran's avatar
Oleksii Savran committed
480
481
                    }
                </Grid>
Matija Obreza's avatar
Matija Obreza committed
482
            </PageLayout>
Maxym Borodenko's avatar
Maxym Borodenko committed
483
484
485
486
        );
    }
}

487
488
const mapStateToProps = (state) => ({
    serverInfo: state.serverInfo.data,
Oleksii Savran's avatar
Oleksii Savran committed
489
    crops: state.crop.public.list || undefined,
Oleksii Savran's avatar
Oleksii Savran committed
490
    lastNews: state.cms.public.lastNews,
491
492
493
    // accessToken: state.login.access_token,
});

Maxym Borodenko's avatar
Maxym Borodenko committed
494
const mapDispatchToProps = (dispatch) => bindActionCreators({
Oleksii Savran's avatar
Oleksii Savran committed
495
    loadLastNews,
496
    // navigateTo,
Maxym Borodenko's avatar
Maxym Borodenko committed
497
498
}, dispatch);

499
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(translate()(WelcomePage)));