37 lines
727 B
TypeScript
37 lines
727 B
TypeScript
import React, {useState, useEffect} from 'react';
|
|
|
|
interface DownloadCVProps {
|
|
windowSize: number;
|
|
}
|
|
|
|
/**
|
|
* @return {jsx} a presentation of me
|
|
*/
|
|
export default function DownloadCV({windowSize}: DownloadCVProps) {
|
|
const [buttonClass, setButtonClass] = useState('');
|
|
|
|
useEffect(() => {
|
|
if (window.innerWidth > 1200) {
|
|
setButtonClass('btn-lg');
|
|
} else {
|
|
setButtonClass('');
|
|
}
|
|
}, [windowSize]);
|
|
|
|
return (
|
|
<div
|
|
className='
|
|
tile-child d-flex
|
|
flex-column
|
|
align-items-center
|
|
justify-content-center'
|
|
id='downloadcv'>
|
|
<a
|
|
href='https://git.gaetanbrochard.dev/gbrochar/expo-web'
|
|
className={'d-inline btn btn-mine ' + buttonClass}>
|
|
Download my CV
|
|
</a>
|
|
<br />
|
|
</div>
|
|
);
|
|
}; |