@@ -10,13 +10,10 @@ import { useSearchParams } from 'react-router-dom'
1010import classNames from 'classnames'
1111
1212import {
13- FacebookSocialShareBtn ,
1413 fileDownloadCanvasAsImage ,
1514 IconOutline ,
16- LinkedinSocialShareBtn ,
1715 LoadingSpinner ,
1816 NavigateBackFunction ,
19- TwitterSocialShareBtn ,
2017 useNavigateBack ,
2118} from '../../../../lib'
2219import { useCertificateScaling } from '../use-certificate-scaling-hook'
@@ -25,6 +22,7 @@ import { ActionButton } from '../action-button'
2522import { hideSiblings } from '../functions'
2623import { getViewStyleParamKey } from '../../learn.routes'
2724import { TCAShareCertificateModalData , useTCAShareCertificateModal } from '../tca-share-certificate-modal'
25+ import { useCertificatePrint } from '../use-certificate-print-hook'
2826
2927import styles from './CertificatePageLayout.module.scss'
3028
@@ -77,6 +75,9 @@ const CertificatePageLayout: FC<CertificatePageLayoutProps> = (props: Certificat
7775
7876 } , [ props . title , getCertificateCanvas ] )
7977
78+ const handlePrint : ( ) => Promise < void >
79+ = useCertificatePrint ( props . certificateElRef , props . title ?? '' )
80+
8081 useLayoutEffect ( ( ) => {
8182 const el : HTMLElement = wrapElRef . current
8283 if ( props . fullScreenCertLayout !== true || ! el ) {
@@ -120,6 +121,10 @@ const CertificatePageLayout: FC<CertificatePageLayoutProps> = (props: Certificat
120121 )
121122 }
122123 >
124+ < ActionButton
125+ icon = { < IconOutline . PrinterIcon /> }
126+ onClick = { handlePrint }
127+ />
123128 < ActionButton
124129 icon = { < IconOutline . DownloadIcon /> }
125130 onClick = { handleDownload }
0 commit comments