source: client_app/src/components/data/components/user_internships.js@ 2e507a8

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

front end additions

  • Property mode set to 100644
File size: 958 bytes
Line 
1import {Card, Container} from "semantic-ui-react";
2import {Redirect} from "react-router-dom";
3import React from "react";
4
5const UserInternships = (props) =>{
6 var itemsArray = [];
7
8 if(props.userProfile.type==="USER"){
9 if(props.userProfile.email!=null){
10 props.userProfile.internships.forEach(item => {
11 let obj = {}
12 obj.header = item.title;
13 obj.description = item.description + "\n" + item.accountEmail + " for contact!";
14 obj.meta = "Company: " + item.accountName + " / Salary: " + item.salary;
15
16 itemsArray.push(obj);
17 });
18
19 return(
20 <Container textAlign="left">
21 <h1>Internships for you!</h1>
22 <Card.Group items={itemsArray} />
23 </Container>
24 );
25 }
26 }
27
28 return (
29 <Redirect to={"/login"}/>
30 );
31}
32
33export default UserInternships;
Note: See TracBrowser for help on using the repository browser.