Changeset 2e507a8 for client_app/src/components/data/profile.js
- Timestamp:
- 01/12/21 21:10:56 (3 years ago)
- Branches:
- master
- Children:
- 47067ae
- Parents:
- a70db1a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client_app/src/components/data/profile.js
ra70db1a r2e507a8 1 1 import React from 'react'; 2 import UserDetails from "./components/ user_profile";2 import UserDetails from "./components/profiles/user_profile"; 3 3 import { Redirect } from "react-router-dom"; 4 import CompanyProfile from "./components/profiles/company_profile"; 5 import TeamProfile from "./components/profiles/team_profile"; 4 6 5 7 const Profile = (props) => { … … 17 19 } 18 20 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 19 41 return( 20 42 <Redirect to={"/login"}/>
Note:
See TracChangeset
for help on using the changeset viewer.