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