diff --git a/apps/portal/src/components/resumes/ResumePdf.tsx b/apps/portal/src/components/resumes/ResumePdf.tsx index 4a4c3a42..8caf0cb5 100644 --- a/apps/portal/src/components/resumes/ResumePdf.tsx +++ b/apps/portal/src/components/resumes/ResumePdf.tsx @@ -24,23 +24,18 @@ export default function ResumePdf({ url }: Props) { setNumPages(pdf.numPages); }; - useEffect(() => { - const onPageResize = () => { - setComponentWidth( - document.querySelector('#pdfView')?.getBoundingClientRect().width ?? - 780, - ); - }; - - window.addEventListener('resize', onPageResize); + const onPageResize = () => { + setComponentWidth( + document.querySelector('#pdfView')?.getBoundingClientRect().width ?? 780, + ); + }; - return () => { - window.removeEventListener('resize', onPageResize); - }; - }, []); + useEffect(() => { + onPageResize(); + }, [pageWidth]); return ( -
+
- {numPages > 1 && ( -
- setPageNumber(page)} - /> -
- )} +
+ setPageNumber(page)} + /> +
); } diff --git a/apps/portal/src/components/resumes/browse/ResumeListItem.tsx b/apps/portal/src/components/resumes/browse/ResumeListItem.tsx index eeeab21a..9db65f49 100644 --- a/apps/portal/src/components/resumes/browse/ResumeListItem.tsx +++ b/apps/portal/src/components/resumes/browse/ResumeListItem.tsx @@ -9,6 +9,18 @@ import { } from '@heroicons/react/20/solid'; import { ChatBubbleLeftIcon, StarIcon } from '@heroicons/react/24/outline'; +import type { + ExperienceFilter, + LocationFilter, + RoleFilter, +} from '~/utils/resumes/resumeFilters'; +import { + EXPERIENCES, + getFilterLabel, + LOCATIONS, + ROLES, +} from '~/utils/resumes/resumeFilters'; + import type { Resume } from '~/types/resume'; type Props = Readonly<{ @@ -19,52 +31,59 @@ type Props = Readonly<{ export default function ResumeListItem({ href, resumeInfo }: Props) { return ( -
-
- {resumeInfo.title} -
-
-