source:
client_app/src/components/work/user_projects.js@
bf9486e
Last change on this file since bf9486e was bf9486e, checked in by , 3 years ago | |
---|---|
|
|
File size: 868 bytes |
Rev | Line | |
---|---|---|
[2e507a8] | 1 | import {Card, Container} from "semantic-ui-react"; |
2 | import {Redirect} from "react-router-dom"; | |
3 | import React from "react"; | |
[2c06dce] | 4 | import Projects from "../item_components/project_component"; |
[2e507a8] | 5 | |
6 | const UserProjects = (props) =>{ | |
7 | if(props.userProfile.type==="USER"){ | |
8 | if(props.userProfile.email!=null){ | |
9 | return( | |
[96eb8bc] | 10 | <Container> |
[2e507a8] | 11 | <h1>Projects for you!</h1> |
[ed3f5c4] | 12 | {props.userProfile.projects.map((item,index) =>{ |
[96eb8bc] | 13 | return <Projects |
[bf9486e] | 14 | search={true} |
[ed3f5c4] | 15 | key={item.id} |
16 | index={index} | |
17 | item={item} | |
[96eb8bc] | 18 | />}) |
19 | } | |
[2e507a8] | 20 | </Container> |
21 | ); | |
22 | } | |
23 | } | |
24 | ||
25 | return ( | |
26 | <Redirect to={"/login"}/> | |
27 | ); | |
28 | } | |
29 | ||
30 | export default UserProjects; |
Note:
See TracBrowser
for help on using the repository browser.