Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from "react";
  2. import Auxiliary from "../Auxiliary";
  3. import Photo from "../components/Photo/Photo.js";
  4. import PersonalData from "../components/PersonalData/PersonalData.js";
  5. import Certifications from "../components/PersonalData/Certyfications/Certyfications.js";
  6. import Birthday from "../components/PersonalData/Birthday/Birthday.js";
  7. export default class EditProfileContainer extends Component {
  8.   state = {
  9.     userID: "",
  10.     email: "123@123.xd",
  11.     firstName: "jacek",
  12.     lastName: "placek",
  13.     birthday: new Date(),
  14.     photoUrl:
  15.       "https://img1.looper.com/img/gallery/the-untold-truth-of-trailer-park-boys/intro.jpg",
  16.     phone: "123456789",
  17.     certificationsUrls: ["", "", ""],
  18.     jobTypeDescription: "",
  19.     experienceDescription: "",
  20.     personDescription: ""
  21.   };
  22.  
  23.   birthdayHandler = date => {
  24.     this.setState({
  25.       birthday: date
  26.     });
  27.   };
  28.   firstNameChangeHandler = event => {
  29.     this.setState({
  30.       firstName: event.target.value
  31.     });
  32.   };
  33.   lastNameChangeHandler = event => {
  34.     this.setState({
  35.       lastName: event.target.value
  36.     });
  37.   };
  38.   phoneHandler = event => {
  39.     this.setState({
  40.       phone: event.target.value
  41.     });
  42.   };
  43.   render() {
  44.     return (
  45.       <Auxiliary className="container-fluid">
  46.         <div className="row " style={{ marginRight: 0, marginTop: 10 }}>
  47.           <div className="col-sm-6 col-xl-4">
  48.             <div class="row">
  49.               <Photo photoUrl={this.state.photoUrl} />
  50.             </div>
  51.           </div>
  52.  
  53.           <div className="col-sm-3 col-xl-2">
  54.             <div class="row">
  55.               <PersonalData
  56.                 firstName={this.state.firstName}
  57.                 firstNameHandler={this.firstNameChangeHandler}
  58.                 lastName={this.state.lastName}
  59.                 lastNameHandler={this.lastNameChangeHandler}
  60.                 email={this.state.email}
  61.                 phone={this.state.phone}
  62.                 phoneHandler={this.phoneHandler}
  63.                 birthday={this.state.birthday}
  64.                 birthdayHandler={this.birthdayHandler}
  65.                 certificationsUrl={this.state.certificationsUrls}
  66.               />
  67.             </div>
  68.           </div>
  69.  
  70.           <div className="col-sm-3 col-xl-2">
  71.             <div class="row">
  72.               <Birthday
  73.                 birthday={this.state.birthday}
  74.                 birthdayHandler={this.birthdayHandler}
  75.               />
  76.               <Certifications />
  77.             </div>
  78.           </div>
  79.         </div>
  80.       </Auxiliary>
  81.  
  82.       /*<div>{this.state.firstName}<br/>{this.state.phone}<br/>{this.state.lastName}<br/>{this.state.birthday.toDateString()}</div>
  83.                 <JobTypeDescription/>
  84.                 <ExperienceDescription/>
  85.                 <PersonDescription/>
  86.                 <DeleteAccount/>
  87.                 <SaveChanges/> */
  88.     );
  89.   }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement