From 2b7e31a6c8cf85e6fcbadd40aef09ebf55de887d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Thu, 15 Dec 2016 14:09:23 +0000 Subject: [PATCH] implement projects component skeleton for both orgs and users --- frontend/src/components/projects/index.js | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 frontend/src/components/projects/index.js diff --git a/frontend/src/components/projects/index.js b/frontend/src/components/projects/index.js new file mode 100644 index 00000000..376702ab --- /dev/null +++ b/frontend/src/components/projects/index.js @@ -0,0 +1,68 @@ +const React = require('react'); +const ReactIntl = require('react-intl'); +// const ReactRouter = require('react-router'); + +const Column = require('@ui/components/column'); +const Button = require('@ui/components/button'); +const Row = require('@ui/components/row'); + +const { + FormattedMessage +} = ReactIntl; + +// const { +// Link, +// Match, +// Miss, +// Redirect +// } = ReactRouter; + +const Projects = ({ + projects = [] +}) => { + console.log(projects); + const empty = projects.length ? null : ( + + +

+ +

+
+
+ ); + + const _projects = projects.map((project) => ( +
  • + + {project.name} ({project.plan}) ⚙️ +
  • + )); + + return ( +
    + {empty} + + + + + + +
      + {_projects} +
    +
    +
    + ); +}; + +Projects.propTypes = { + projects: React.PropTypes.arrayOf(React.PropTypes.shape({ + id: React.PropTypes.string, + name: React.PropTypes.string, + plan: React.PropTypes.string + })) +}; + +module.exports = Projects;