Rename variable of resume file URL

This commit is contained in:
Ariful Alam 2022-10-03 15:54:52 +06:00
parent 1dec29a718
commit a603e4236d
5 changed files with 8 additions and 6 deletions

View File

@ -206,7 +206,7 @@ const config = {
},
},
resume: {
fileName: 'resume.pdf', // Place the resume file in public folder with the same name as the 'fileName' property.
fileUrl: '', // Empty fileUrl will hide the `Download Resume` button.
},
social: {
linkedin: '',

View File

@ -11,7 +11,7 @@ const config = {
},
},
resume: {
fileName: 'resume.pdf', // Place the resume file in public folder with the same name as the 'fileName' property.
fileUrl: 'resume.pdf', // Empty fileUrl will hide the `Download Resume` button.
},
social: {
linkedin: 'ariful-alam',

Binary file not shown.

View File

@ -55,9 +55,9 @@ const AvatarCard = ({ profile, loading, avatarRing, resume }) => {
: profile.bio}
</div>
</div>
{resume?.fileName && (
{resume?.fileUrl && (
<a
href={resume.fileName}
href={resume.fileUrl}
target="_blank"
className="btn btn-outline btn-primary text-xs mt-6"
download
@ -75,7 +75,9 @@ AvatarCard.propTypes = {
profile: PropTypes.object,
loading: PropTypes.bool.isRequired,
avatarRing: PropTypes.bool.isRequired,
resume: PropTypes.object,
resume: PropTypes.shape({
fileUrl: PropTypes.string,
}),
};
export default AvatarCard;

View File

@ -145,7 +145,7 @@ export const sanitizeConfig = (config) => {
},
},
resume: {
fileName: config?.resume?.fileName || false,
fileUrl: config?.resume?.fileUrl || '',
},
social: {
linkedin: config?.social?.linkedin,