Ignore:
Timestamp:
01/12/21 21:10:56 (3 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
47067ae
Parents:
a70db1a
Message:

front end additions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client_app/src/components/data/profile.js

    ra70db1a r2e507a8  
    11import React from 'react';
    2 import UserDetails from "./components/user_profile";
     2import UserDetails from "./components/profiles/user_profile";
    33import { Redirect } from "react-router-dom";
     4import CompanyProfile from "./components/profiles/company_profile";
     5import TeamProfile from "./components/profiles/team_profile";
    46
    57const Profile = (props) => {
     
    1719    }
    1820
     21    if(props.userProfile.type==="COMPANY"){
     22        return (
     23            <CompanyProfile data={{
     24                email: props.userProfile.email,
     25                name: props.userProfile.name,
     26                address: props.userProfile.address
     27            }}/>
     28        );
     29    }
     30
     31    if(props.userProfile.type==="TEAM"){
     32        return (
     33            <TeamProfile data={{
     34                email: props.userProfile.email,
     35                name: props.userProfile.name,
     36                members: props.userProfile.members
     37            }}/>
     38        );
     39    }
     40
    1941    return(
    2042        <Redirect to={"/login"}/>
Note: See TracChangeset for help on using the changeset viewer.