Changeset 96eb8bc for client_app


Ignore:
Timestamp:
01/12/21 21:38:05 (4 years ago)
Author:
i-ina <76742075+i-ina@…>
Branches:
master
Children:
48e4a3e
Parents:
47067ae
Message:

added projects render

Location:
client_app/src/components/data/components
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • client_app/src/components/data/components/item_components/job_component.js

    r47067ae r96eb8bc  
    33
    44const Jobs = (props) => {
    5 
    65    return(
    76        <Segment>
  • client_app/src/components/data/components/user_internships.js

    r47067ae r96eb8bc  
    1 import {Card, Container} from "semantic-ui-react";
     1import {Container} from "semantic-ui-react";
    22import {Redirect} from "react-router-dom";
    33import React from "react";
  • client_app/src/components/data/components/user_jobs.js

    r47067ae r96eb8bc  
    66
    77const UserJobs = (props) =>{
    8     var itemsArray = [];
    9 
    108    if(props.userProfile.type==="USER"){
    119        if(props.userProfile.email!=null){
  • client_app/src/components/data/components/user_projects.js

    r47067ae r96eb8bc  
    22import {Redirect} from "react-router-dom";
    33import React from "react";
     4import Projects from "./item_components/project_component";
    45
    56const UserProjects = (props) =>{
    6     var itemsArray = [];
    7 
    87    if(props.userProfile.type==="USER"){
    98        if(props.userProfile.email!=null){
    10             props.userProfile.projects.forEach(item => {
    11                 let obj = {}
    12                 obj.header = item.title;
    13                 obj.description = item.description + "\n" + item.accountEmail + " for contact!";
    14                 obj.meta = "Team: " + item.accountName + " / Salary: " + item.salary;
    15 
    16                 itemsArray.push(obj);
    17             });
    18 
    199            return(
    20                 <Container textAlign="left">
     10                <Container>
    2111                    <h1>Projects for you!</h1>
    22                     <Card.Group items={itemsArray} />
     12                    {props.userProfile.projects.map(item =>{
     13                        return <Projects
     14                            title={item.title}
     15                            description={item.description}
     16                            accountName={item.accountName}
     17                            accountEmail={item.accountEmail}
     18                            skills={item.skillsRequired}
     19                            type={props.userProfile.type}
     20                        />})
     21                    }
    2322                </Container>
    2423            );
Note: See TracChangeset for help on using the changeset viewer.