lay education section out

- define education interface
This commit is contained in:
Ruidy Nemausat 2020-05-12 18:18:22 +02:00
parent 326089ff27
commit 122810fe71
2 changed files with 41 additions and 17 deletions

View file

@ -1,3 +1,12 @@
interface Education {} import {TimePeriod} from '../types';
interface Education {
school: string;
from: TimePeriod;
to: TimePeriod;
degree: string;
field: string;
description: string;
}
export default Education; export default Education;

View file

@ -15,6 +15,7 @@ import {
import DevFull from '../models/DevFull'; import DevFull from '../models/DevFull';
import Experience from '../models/Experience'; import Experience from '../models/Experience';
import {parseDate} from '../types'; import {parseDate} from '../types';
import Education from '../models/Education';
const Profile: FC<DevFull> = () => { const Profile: FC<DevFull> = () => {
const dev: DevFull = { const dev: DevFull = {
@ -53,7 +54,17 @@ const Profile: FC<DevFull> = () => {
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus at rem totam sed qui! Quas.', 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus at rem totam sed qui! Quas.',
}, },
], ],
educations: [], educations: [
{
school: 'University of Washington',
from: new Date(1993, 9),
to: new Date(1999, 6),
degree: 'Master',
field: 'Computer Science',
description:
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus at rem totam sed qui! Quas.',
},
],
repos: [], repos: [],
}; };
@ -134,22 +145,26 @@ const Profile: FC<DevFull> = () => {
<div className="profile-edu bg-white p-2"> <div className="profile-edu bg-white p-2">
<h2 className="text-primary">Education</h2> <h2 className="text-primary">Education</h2>
<div> {dev.educations.map((edu: Education, i: number) => (
<h3>University of Washington</h3> <div key={i}>
<p>Sep. 1993 - June 1999</p> <h3>{edu.school}</h3>
<p>{`${parseDate(edu.from)} - ${parseDate(edu.to)}`}</p>
<p> <p>
<strong>Degree: </strong>Master <strong>Degree: </strong>
{edu.degree}
</p> </p>
<p> <p>
<strong>Field: </strong>Computer Science <strong>Field: </strong>
{edu.field}
</p> </p>
<p> <p>
<strong>Description: </strong>Lorem ipsum dolor sit amet <strong>Description: </strong>
consectetur adipisicing elit. Repellendus at rem totam sed qui! {edu.description}
Quas.
</p> </p>
</div> </div>
))}
</div> </div>
<div className="profile-github"> <div className="profile-github">
<h2 className="text-primary my-1"> <h2 className="text-primary my-1">
<i className="fa fa-github"></i> <i className="fa fa-github"></i>