Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface UserCertificationViewBaseProps {

const UserCertificationViewBase: FC<UserCertificationViewBaseProps> = (props: UserCertificationViewBaseProps) => {
const [queryParams]: [URLSearchParams, any] = useSearchParams()
const wrapElRef: MutableRefObject<HTMLElement | any> = useRef()
const elRef: MutableRefObject<HTMLElement | any> = useRef()

const tcaCertificationPath: string = getTCACertificationPath(`${props.certification?.dashedName}`)
const certificateElRef: MutableRefObject<HTMLDivElement | any> = useRef()
Expand All @@ -59,7 +59,7 @@ const UserCertificationViewBase: FC<UserCertificationViewBaseProps> = (props: Us
}, [props.enrollment])

useLayoutEffect(() => {
const el: HTMLElement = wrapElRef.current
const el: HTMLElement = elRef.current
if (!el || !isModalView) {
return
}
Expand All @@ -72,7 +72,7 @@ const UserCertificationViewBase: FC<UserCertificationViewBaseProps> = (props: Us
<PageTitle>
{`${!!props.enrollment && `${props.enrollment.userName}'s `}${props.certification?.title} Certificate`}
</PageTitle>
<LoadingSpinner hide={props.enrollmentError || (props.profile && !!props.enrollment)} />
<LoadingSpinner hide={props.enrollmentError || (props.profile && !!props.enrollment)} ref={elRef} />

{props.enrollmentError && (
<CertificatePageLayout
Expand All @@ -86,7 +86,7 @@ const UserCertificationViewBase: FC<UserCertificationViewBaseProps> = (props: Us
</CertificatePageLayout>
)}

<div className='full-height-frame' ref={wrapElRef}>
<div className='full-height-frame' ref={elRef}>
{props.profile && props.certification && props.enrollment && (
<HiringManagerView
certification={props.certification}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const UuidCertificationView: FC<{}> = () => {
}

hideSiblings(el.parentElement as HTMLElement)
}, [isModalView])
})

return (
<>
<LoadingSpinner hide={enrollmentReady} ref={elRef} />
<LoadingSpinner hide={enrollmentError} ref={elRef} />
{enrollmentReady && enrollmentError && (
<UserCertificationViewBase
enrollment={enrollment}
Expand Down