diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index b25e8c9..552ad07 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -1,9 +1,12 @@ import React, {FC} from 'react'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; -import Header from '../components/Header'; -import DevFull, {dummyDevFull as dev} from '../models/DevFull'; import {faUserCircle, faGraduationCap} from '@fortawesome/free-solid-svg-icons'; import {faBlackTie} from '@fortawesome/free-brands-svg-icons'; +import Header from '../components/Header'; +import DevFull, {dummyDevFull as dev} from '../models/DevFull'; + +import Experience from '../models/Experience'; +import {getTimePeriod} from '../types/TimePeriod'; const Dashboard: FC = () => { return ( @@ -20,6 +23,7 @@ const Dashboard: FC = () => { Add Education +

Experience Credentials

@@ -29,26 +33,21 @@ const Dashboard: FC = () => { - - - - - - - - - - - - - - + + {dev.experiences.map((exp: Experience, i: number) => ( + + + + + + + ))} +
Years
MicrosoftSenior DeveloperOct 2011 - Current - -
Sun MicrosystemsSystem AdminOct 2004 - Nov 2010 - -
{exp.company}{exp.position}{getTimePeriod(exp.from, exp.to)} + +
+

Education Credentials

diff --git a/src/types/TimePeriod.ts b/src/types/TimePeriod.ts index dba6009..f78ce40 100644 --- a/src/types/TimePeriod.ts +++ b/src/types/TimePeriod.ts @@ -10,6 +10,11 @@ const parseDate = (date: TimePeriod): string => { return moment(date).format('MMM. YYYY'); }; +/** + * Formats a time period assignment: experience or education. + * @param from Start of the assignment. Must be a Date + * @param to End of the assignment. Can be "Current" + */ export const getTimePeriod = (from: TimePeriod, to: TimePeriod): string => `${parseDate(from)} - ${parseDate(to)}`;