File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src-ts/tools/learn/learn-lib/certificate-page-layout Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { getViewStyleParamKey } from '../../learn.routes'
2727import { TCAShareCertificateModalData , useTCAShareCertificateModal } from '../tca-share-certificate-modal'
2828
2929import styles from './CertificatePageLayout.module.scss'
30+ import { useCertificatePrint } from '../use-certificate-print-hook'
3031
3132export type CertificatePageLayoutStyle = 'large-container'
3233
@@ -77,6 +78,9 @@ const CertificatePageLayout: FC<CertificatePageLayoutProps> = (props: Certificat
7778
7879 } , [ props . title , getCertificateCanvas ] )
7980
81+ const handlePrint : ( ) => Promise < void >
82+ = useCertificatePrint ( props . certificateElRef , props . title ?? '' )
83+
8084 useLayoutEffect ( ( ) => {
8185 const el : HTMLElement = wrapElRef . current
8286 if ( props . fullScreenCertLayout !== true || ! el ) {
@@ -120,6 +124,10 @@ const CertificatePageLayout: FC<CertificatePageLayoutProps> = (props: Certificat
120124 )
121125 }
122126 >
127+ < ActionButton
128+ icon = { < IconOutline . PrinterIcon /> }
129+ onClick = { handlePrint }
130+ />
123131 < ActionButton
124132 icon = { < IconOutline . DownloadIcon /> }
125133 onClick = { handleDownload }
You can’t perform that action at this time.
0 commit comments