diff --git a/src/components/DevProfile.tsx b/src/components/DevProfile.tsx index 124ac10..f6c0536 100644 --- a/src/components/DevProfile.tsx +++ b/src/components/DevProfile.tsx @@ -1,21 +1,18 @@ import React, {FC} from 'react'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import {faCheck} from '@fortawesome/free-solid-svg-icons'; +import DevSummary from '../models/DevSummary'; -interface IProps { - name: string; - description: string; - location: string; - skills: string[]; -} - -const DevProfile: FC = ({name, description, location, skills}) => ( +const DevProfile: FC = ({ + id, + name, + picture, + description, + location, + skills, +}) => (
- Some guy + {name}

{name}

{description}

diff --git a/src/models/DevSummary.ts b/src/models/DevSummary.ts new file mode 100644 index 0000000..bf9e037 --- /dev/null +++ b/src/models/DevSummary.ts @@ -0,0 +1,10 @@ +interface DevSummary { + id: string; + name: string; + picture: string; + description: string; + location: string; + skills: string[]; +} + +export default DevSummary; diff --git a/src/pages/Developers.tsx b/src/pages/Developers.tsx index 3dbfcab..9ca5532 100644 --- a/src/pages/Developers.tsx +++ b/src/pages/Developers.tsx @@ -1,20 +1,33 @@ import React, {FC} from 'react'; import Header from '../components/Header'; import DevProfile from '../components/DevProfile'; +import DevSummary from '../models/DevSummary'; // interface IProps { -// developers: [] +// developers: DevSummary[] // } // const Developers: FC = ({developers}) => ( const Developers: FC = () => { - const developers = [ + const developers: DevSummary[] = [ { + id: '0', name: 'John Doe', + picture: + 'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200', description: 'Developer at Microsoft', location: 'Seattle, WA', skills: ['HTML', 'CSS', 'JavaScript', 'Python'], }, + { + id: '42', + name: 'Ruidy Nemausat', + picture: + 'https://lh3.googleusercontent.com/a-/AOh14GhncH95MWKwPR3TRKy4eVd4n6w0-fobe4dhiam2xA', + description: 'Frontend Engineer at DESY', + location: 'Hamburg, DE', + skills: ['React', 'TypeScript', 'Redux', 'GraphQL'], + }, ]; return ( @@ -25,14 +38,9 @@ const Developers: FC = () => { icon="connectdevelop" />
- {developers.map((dev, i) => ( - + {developers.map(dev => ( + // use spread operator to pass props + ))}