summaryrefslogtreecommitdiffstats
path: root/client/src/admin/jsx/MainScreen.jsx
blob: 8808dc5c619957615c837c777a5e19ac3855ef67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React, { Fragment } from 'react';
import { WithHover, t, goTo } from '../hocs';
import { onKeyPress } from '../helpers'

const MainScreen = ({ projects }) => (
  <div className="main-screen">
    <h1 className="main-screen__header">{ t('main-title') }</h1>
    <div className="main-screen__list">
      { !projects.length && (
        <WithHover message="edit-current-project-hover">
          <p
            className="main-screen__item"
            tabIndex="0"
          >
            { t('edit-current-project') }
          </p>
        </WithHover>
      )}
      { !projects.length && (
        <WithHover message="show-saved-projects-hover">
          <p
            className="main-screen__item"
            tabIndex="0"
          >
            { t('show-saved-projects') }
          </p>
        </WithHover>
      )}
      <WithHover message="create-new-project-hover">
        <p
          className="main-screen__item"
          onClick={ goTo('creator') }
          onKeyPress={onKeyPress}
          tabIndex="0"
        >
          { t('create-new-project') }
        </p>
      </WithHover>
    </div>
  </div>
);

export default MainScreen;