From 0bc393e41c5b238c1d95a49ede3dec45b4ed527e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 9 Aug 2017 17:04:15 +0300 Subject: Add action buttons to project rows --- src/components/projects/ProjectAuthList.js | 33 ++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'src/components/projects/ProjectAuthList.js') diff --git a/src/components/projects/ProjectAuthList.js b/src/components/projects/ProjectAuthList.js index 093b3279..217a8375 100644 --- a/src/components/projects/ProjectAuthList.js +++ b/src/components/projects/ProjectAuthList.js @@ -5,23 +5,26 @@ import NoProjectsAlert from "./NoProjectsAlert"; import ProjectAuth from "./ProjectAuth"; import "./ProjectAuthList.css"; -const ProjectAuthList = ({authorizations, onProjectClick}) => ( -
-
-
Project name
-
Last edited
-
Access rights
-
-
- {authorizations.length === 0 ? - : - authorizations.map(authorization => ( +const ProjectAuthList = ({authorizations}) => { + if (authorizations.length === 0) { + return ; + } + + return ( +
+
+
Project name
+
Last edited
+
Access rights
+
+
+ {authorizations.map(authorization => ( - )) - } + ))} +
-
-); + ); +}; ProjectAuthList.propTypes = { authorizations: PropTypes.arrayOf(Shapes.Authorization).isRequired, -- cgit v1.2.3