source: client_app/src/components/work/team_projects.js@ ed3f5c4

Last change on this file since ed3f5c4 was ed3f5c4, checked in by Vzdra <vladko.zdravkovski@…>, 3 years ago

more groundwork

  • Property mode set to 100644
File size: 948 bytes
Line 
1import React from 'react';
2import {Link, Redirect} from 'react-router-dom';
3import { Container, Card, Button } from 'semantic-ui-react';
4import Projects from "../item_components/project_component";
5
6
7const TeamProjects = (props) =>{
8 if(props.userProfile.type==="TEAM"){
9 if(props.userProfile.email!=null){
10 return(
11 <Container textAlign="left">
12 <Button as={Link} to={"/register/project"} primary>Add</Button>
13 <h1>Registered Projects:</h1>
14 {props.userProfile.projects.map((item, index) =>{
15 return <Projects
16 key={item.id}
17 index={index}
18 item={item}
19 />
20 })}
21 </Container>
22 );
23 }
24 }
25
26 return (
27 <Redirect to={"/login"}/>
28 );
29}
30
31export default TeamProjects;
Note: See TracBrowser for help on using the repository browser.