Changeset 47067ae for client_app/src/components
- Timestamp:
- 01/12/21 21:24:08 (4 years ago)
- Branches:
- master
- Children:
- 96eb8bc
- Parents:
- 2e507a8
- Location:
- client_app/src/components
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
client_app/src/components/data/components/user_internships.js
r2e507a8 r47067ae 2 2 import {Redirect} from "react-router-dom"; 3 3 import React from "react"; 4 import Internships from "./item_components/internship_component"; 4 5 5 6 const UserInternships = (props) =>{ 6 var itemsArray = [];7 8 7 if(props.userProfile.type==="USER"){ 9 8 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 9 return( 20 <Container textAlign="left"> 21 <h1>Internships for you!</h1> 22 <Card.Group items={itemsArray} /> 10 <Container> 11 <h1>Internships for you!</h1> 12 {props.userProfile.internships.map(item =>{ 13 return <Internships 14 title={item.title} 15 description={item.description} 16 accountName={item.accountName} 17 accountEmail={item.accountEmail} 18 skills={item.skillsTrained} 19 type={props.userProfile.type} 20 />}) 21 } 23 22 </Container> 24 23 ); -
client_app/src/components/main/App.js
r2e507a8 r47067ae 33 33 <Route path={"/user/internships"} render={() => <UserInternships userProfile={this.state.currentUser}/>} /> 34 34 <Route path={"/user/projects"} render={() => <UserProjects userProfile={this.state.currentUser}/>} /> 35 <Route path={"/team/jobs"} />35 <Route path={"/team/jobs"} render={() => <CompanyJobs userProfile={this.state.currentUser} />}/> 36 36 <Route path={"/team/projects"} /> 37 37 <Route path={"/company/jobs"} render={() => <CompanyJobs userProfile={this.state.currentUser} />}/>
Note:
See TracChangeset
for help on using the changeset viewer.