added conditional download resume feature

This commit is contained in:
Joan Jeremiah J
2022-10-02 17:29:59 +05:30
parent e20a1d7321
commit 29a75d06cd
5 changed files with 13 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import { fallbackImage, skeleton } from '../../helpers/utils';
import LazyImage from '../lazy-image';
const AvatarCard = ({ profile, loading, avatarRing }) => {
const AvatarCard = ({ profile, loading, avatarRing, resume }) => {
return (
<div className="card shadow-lg compact bg-base-100">
<div className="grid place-items-center py-8">
@@ -55,6 +55,9 @@ const AvatarCard = ({ profile, loading, avatarRing }) => {
: profile.bio}
</div>
</div>
{ resume?.fileName &&
<a href= { resume.fileName } target="_blank" className='btn mt-4' download>Download my resume</a>
}
</div>
</div>
);
@@ -64,6 +67,7 @@ AvatarCard.propTypes = {
profile: PropTypes.object,
loading: PropTypes.bool.isRequired,
avatarRing: PropTypes.bool.isRequired,
resume: PropTypes.object
};
export default AvatarCard;