Skip to content

Commit

Permalink
Merge tag 'fix-cv-url' into develop
Browse files Browse the repository at this point in the history
v2.19.1
  • Loading branch information
DDZBX committed Sep 26, 2024
2 parents 3368254 + 67b467a commit 640aebb
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/pages/cv/[url].tsx
Original file line number Diff line number Diff line change
@@ -29,7 +29,9 @@ const CVPage = ({ cv, exists = false, router }: CVPageProps) => {
const title = candidateExists
? `Entourage Pro\xa0: Aidez ${cv.user.candidat.firstName} à retrouver un emploi`
: '';
const urlImg = `${process.env.AWSS3_URL}${process.env.AWSS3_IMAGE_DIRECTORY}${cv.user.candidat.id}.${CV_STATUS.Published.value}.jpg`;
const urlImg = candidateExists
? `${process.env.AWSS3_URL}${process.env.AWSS3_IMAGE_DIRECTORY}${cv.user.candidat.id}.${CV_STATUS.Published.value}.jpg`
: '';

useEffect(() => {
if (cv) {
5 changes: 4 additions & 1 deletion src/pages/cv/pdf/[id].tsx
Original file line number Diff line number Diff line change
@@ -14,7 +14,10 @@ interface CVPDFPageProps {
}

const CVPDFPage = ({ cv, page, router }: CVPDFPageProps) => {
const urlImg = `${process.env.AWSS3_URL}${process.env.AWSS3_IMAGE_DIRECTORY}${cv.user.candidat.id}.${CV_STATUS.Published.value}.jpg`;
const candidatExists = cv && cv.user && cv.user.candidat;
const urlImg = candidatExists
? `${process.env.AWSS3_URL}${process.env.AWSS3_IMAGE_DIRECTORY}${cv.user.candidat.id}.${CV_STATUS.Published.value}.jpg`
: '';

if (!cv) {
return (

0 comments on commit 640aebb

Please sign in to comment.