diff --git a/src/components/DevProfile.tsx b/src/components/DevProfile.tsx index 9c19076..44c65d6 100644 --- a/src/components/DevProfile.tsx +++ b/src/components/DevProfile.tsx @@ -9,16 +9,16 @@ import {DevSummary} from '../models/Dev'; */ const DevProfile: FC = ({ id, - name, + displayName, picture, description, location, skills, }) => (
- {name} + {displayName}
-

{name}

+

{displayName}

{description}

{location}

diff --git a/src/models/Dev.ts b/src/models/Dev.ts index 131f025..5e1312e 100644 --- a/src/models/Dev.ts +++ b/src/models/Dev.ts @@ -5,7 +5,7 @@ import Repo from '../types/Repo'; /** Shorter dev interface */ export interface DevSummary { id: string; - name: string; + displayName: string; picture: string; description: string; location: string; @@ -28,7 +28,7 @@ interface Dev extends DevSummary { */ export const dummyDev: Dev = { id: '0', - name: 'John Doe', + displayName: 'John Doe', picture: 'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200', description: 'Developer at Microsoft', diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index bdb58c3..becd5cc 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -1,4 +1,8 @@ import React, {FC} from 'react'; +// Redux +import {connect} from 'react-redux'; +import {selectProfile} from '../store/firebase'; +// Style import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import { faUserCircle, @@ -7,7 +11,8 @@ import { } from '@fortawesome/free-solid-svg-icons'; import {faBlackTie} from '@fortawesome/free-brands-svg-icons'; import Header from '../components/Header'; -import Dev, {dummyDev as dev} from '../models/Dev'; +// Types +import Dev from '../models/Dev'; import Experience from '../types/Experience'; import {getTimePeriod} from '../types/TimePeriod'; import Education from '../types/Education'; @@ -15,10 +20,10 @@ import Education from '../types/Education'; /** * Main page from which a Dev can peek and edit its own profile. */ -const Dashboard: FC = () => { +const Dashboard: FC = dev => { return (
-
+
Edit Profile @@ -42,7 +47,7 @@ const Dashboard: FC = () => { - {dev.experiences.map((exp: Experience, i: number) => ( + {/* {dev.experiences.map((exp: Experience, i: number) => ( {exp.company} {exp.position} @@ -51,7 +56,7 @@ const Dashboard: FC = () => { - ))} + ))} */} @@ -66,7 +71,7 @@ const Dashboard: FC = () => { - {dev.educations.map((edu: Education, i: number) => ( + {/* {dev.educations.map((edu: Education, i: number) => ( {edu.school} {edu.field} @@ -75,7 +80,7 @@ const Dashboard: FC = () => { - ))} + ))} */}
@@ -87,4 +92,4 @@ const Dashboard: FC = () => { ); }; -export default Dashboard; +export default connect(selectProfile)(Dashboard); diff --git a/src/pages/Developers.tsx b/src/pages/Developers.tsx index 65c00e7..154ecf3 100644 --- a/src/pages/Developers.tsx +++ b/src/pages/Developers.tsx @@ -11,7 +11,7 @@ const Developers: FC = () => { const developers: DevSummary[] = [ { id: '0', - name: 'John Doe', + displayName: 'John Doe', picture: 'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200', description: 'Developer at Microsoft', @@ -20,7 +20,7 @@ const Developers: FC = () => { }, { id: '42', - name: 'Ruidy Nemausat', + displayName: 'Ruidy Nemausat', picture: 'https://lh3.googleusercontent.com/a-/AOh14GhncH95MWKwPR3TRKy4eVd4n6w0-fobe4dhiam2xA', description: 'Fullstack Engineer at DESY', diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index 5e07a6d..d9093f0 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -56,7 +56,7 @@ const Profile: FC = () => { alt="Some guy" className="round-img my-1" /> -

{dev.name}

+

{dev.displayName}

{dev.description}

{dev.location}

@@ -69,7 +69,7 @@ const Profile: FC = () => {
-

{`${dev.name}'s Bio`}

+

{`${dev.displayName}'s Bio`}

{dev.bio}

Skill Set