diff --git a/package-lock.json b/package-lock.json index e8de4e8..0fc2ddd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11706,9 +11706,9 @@ } }, "serialize-javascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.0.tgz", - "integrity": "sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==" }, "serve-index": { "version": "1.9.1", diff --git a/src/components/MentorProfile.js b/src/components/MentorProfile.js index 9a576d1..05ebaf2 100644 --- a/src/components/MentorProfile.js +++ b/src/components/MentorProfile.js @@ -1,4 +1,4 @@ -import React, { Component } from 'react' +import React, { Component } from 'react' import ReactImageFallback from "react-image-fallback"; import data from '../response/response' @@ -8,86 +8,86 @@ import loader from '../assets/loader.gif'; import mentorImage from '../assets/mentor-default.svg'; -class MentorProfile extends Component{ +class MentorProfile extends Component { - state ={ + state = { mentorId: null, - mentorProfile:null + mentorProfile: null } - componentDidMount(){ + componentDidMount() { let id = this.props.match.params.mentorId; - + this.setState({ - mentorId:id, + mentorId: id, // eslint-disable-next-line - mentorProfile: data.filter(item=>item.id == id)[0] + mentorProfile: data.filter(item => item.id == id)[0] }); - + } - + render() { - const hasProfileData = this.state.mentorProfile ? (
-
-
- - -
- -
-
-

{this.state.mentorProfile.name}

-

{this.state.mentorProfile.country}

-

{this.state.mentorProfile.biography}

-

{this.state.mentorProfile.technology}

+ const hasProfileData = this.state.mentorProfile ? (
+
+
+ + +
+ +
+
+

{this.state.mentorProfile.name}

+

{this.state.mentorProfile.country}

+

{this.state.mentorProfile.biography}

+

{this.state.mentorProfile.technology}

+
+
-
-
-
-
-
Technology Stack
-
- { - this.state.mentorProfile.technology.split(',').map((item,key)=>{ - let programmingLanguage = item.toLowerCase(); - - ///below are icons generated by devicon - return - - //if you would like to use Font Mfizz vector icons uncomment the line bellow - // return - - - - }) - } - - +
+
+
Technology Stack
+
+ { + this.state.mentorProfile.technology.split(',').map((item, key) => { + let programmingLanguage = item.toLowerCase(); + + ///below are icons generated by devicon + return + + //if you would like to use Font Mfizz vector icons uncomment the line bellow + // return + + + + }) + } + + +
+
+
-
- -
-
) : (

Loading Data

) +
) : (

Loading Data

) + - return ( -
-
-
- - {hasProfileData} - +
+
+
+ + {hasProfileData} + +
-
) - } + } } export default MentorProfile; \ No newline at end of file