@@ -14,6 +14,9 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
1414 const canvas = await html2canvas ( certificateRef . current ) ;
1515 const imgData = canvas . toDataURL ( "image/png" ) ;
1616
17+ canvas . width = 2000 ;
18+ canvas . height = 1350 ;
19+
1720 const pdf = new jsPDF ( {
1821 orientation : "landscape" ,
1922 unit : "px" ,
@@ -25,10 +28,10 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
2528 } ;
2629
2730 return (
28- < div className = "lg:mt-6 flex flex-col items-center justify-center lg:gap-y-4 py-4 lg:py-16 text-center " >
31+ < div className = "flex flex-col items-center justify-center py-4 text-center lg:mt-6 lg: gap-y-4 lg:py-16" >
2932 < div
3033 ref = { certificateRef }
31- className = "relative flex h-[675px] w-[1000px] scale-55 lg:scale-none flex-row items-center justify-center"
34+ className = "relative flex w-[375px] h-[253.125px] md:h-[675px] md:w-[1000px] flex-row items-center justify-center lg:scale-none "
3235 >
3336 < img
3437 src = "/ecertificate/CERTIFICATE.png"
@@ -42,7 +45,7 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
4245 } }
4346 />
4447 < div
45- className = "absolute text-center text-4xl font-semibold text-white"
48+ className = "absolute text-center text-base md:text- 4xl font-semibold text-white"
4649 style = { {
4750 fontFamily : rusticRoadway . style . fontFamily ,
4851 top : "57%" ,
@@ -58,7 +61,7 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
5861 < AnimatedButton
5962 text = "Download Certificate"
6063 onClick = { ( ) => handleDownload ( ) }
61- className = "bg-primary-400 background-glow - translate-y-[100px] inline-block cursor-pointer rounded-2xl px-4 py-2 text-white"
64+ className = "bg-primary-400 background-glow inline-block translate-y-[50px] cursor-pointer rounded-2xl px-4 py-2 text-white"
6265 />
6366 </ div >
6467 ) ;
0 commit comments