add certLink to certification

This commit is contained in:
Nate Goldsborough
2022-11-04 13:45:27 -05:00
parent 9e34239877
commit 2619676c6e
3 changed files with 13 additions and 3 deletions

View File

@@ -64,6 +64,7 @@ const config = {
body: 'Certification Body Name', body: 'Certification Body Name',
name: 'My Sample Certification', name: 'My Sample Certification',
year: 'March 2022', year: 'March 2022',
certLink: 'https://example.com'
}, },
], ],
education: [ education: [

View File

@@ -2,15 +2,19 @@ import { skeleton } from '../../helpers/utils';
import { Fragment } from 'react'; import { Fragment } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
const ListItem = ({ year, name, body }) => ( const ListItem = ({ year, name, body, certLink }) => (
<li className="mb-5 ml-4"> <li className="mb-5 ml-4">
<div <div
className="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5" className="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5"
style={{ left: '-4.5px' }} style={{ left: '-4.5px' }}
></div> ></div>
<div className="my-0.5 text-xs">{year}</div> <div className="my-0.5 text-xs">{year}</div>
<h3 className="font-semibold">{name}</h3> <div className="font-semibold">
<div className="mb-4 font-normal">{body}</div> <a href={certLink} target="_blank" rel="noreferrer">
{name}
</a>
</div>
<h3 className="mb-4 font-normal">{body}</h3>
</li> </li>
); );
@@ -66,6 +70,9 @@ const Certifications = ({ certifications, loading }) => {
year={`${certification.year}`} year={`${certification.year}`}
name={certification.name} name={certification.name}
body={certification.body} body={certification.body}
certLink={
certification.certLink ? certification.certLink : null
}
/> />
))} ))}
</Fragment> </Fragment>
@@ -83,6 +90,7 @@ ListItem.propTypes = {
year: PropTypes.node, year: PropTypes.node,
name: PropTypes.node, name: PropTypes.node,
body: PropTypes.node, body: PropTypes.node,
certLink: PropTypes.string,
}; };
Certifications.propTypes = { Certifications.propTypes = {

1
types/index.d.ts vendored
View File

@@ -218,6 +218,7 @@ export interface Certifications {
body?: string; body?: string;
name?: string; name?: string;
year?: string; year?: string;
certLink?: string;
} }
export interface Education { export interface Education {