Last change
on this file since 55149cd was ed3f5c4, checked in by Vzdra <vladko.zdravkovski@…>, 3 years ago |
more groundwork
|
-
Property mode
set to
100644
|
File size:
826 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
|
---|
[ed3f5c4] | 14 | key={item.id}
|
---|
| 15 | index={index}
|
---|
| 16 | item={item}
|
---|
[96eb8bc] | 17 | />})
|
---|
| 18 | }
|
---|
[2e507a8] | 19 | </Container>
|
---|
| 20 | );
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | return (
|
---|
| 25 | <Redirect to={"/login"}/>
|
---|
| 26 | );
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | export default UserProjects; |
---|
Note:
See
TracBrowser
for help on using the repository browser.