|
@@ -108,28 +136,9 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
- {
- const svg: any = document.getElementById(e.id);
- const svgData = new XMLSerializer().serializeToString(svg);
- const canvas = document.createElement("canvas");
- const ctx: any = canvas.getContext("2d");
- const img = new Image();
- img.onload = () => {
- canvas.width = img.width;
- canvas.height = img.height;
- ctx.drawImage(img, 0, 0);
- const pngFile = canvas.toDataURL("image/png");
- const downloadLink = document.createElement("a");
- downloadLink.download = `QRCode ${e.title}`;
- downloadLink.href = `${pngFile}`;
- downloadLink.click();
- };
- img.src = `data:image/svg+xml;base64,${btoa(svgData)}`;
- }}
- />
+
|
@@ -152,19 +161,17 @@ function TableStatus({ listPublish }: { listPublish: any }) {
{e.EventMaster_TipeAcara.name}
|
-
- {" "}
{new Intl.DateTimeFormat("id-ID", {
dateStyle: "full",
- }).format(e?.tanggal)}
+ }).format(new Date(e?.tanggal))}
,{" "}
{new Intl.DateTimeFormat("id-ID", {
timeStyle: "short",
- }).format(e?.tanggal)}
+ }).format(new Date(e?.tanggal))}
@@ -172,20 +179,18 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
- {" "}
{new Intl.DateTimeFormat("id-ID", {
dateStyle: "full",
- }).format(e?.tanggalSelesai)}
+ }).format(new Date(e?.tanggalSelesai))}
,{" "}
{new Intl.DateTimeFormat("id-ID", {
timeStyle: "short",
- }).format(e?.tanggalSelesai)}
+ }).format(new Date(e?.tanggalSelesai))}
|
-
|
-
|
- ))
- );
+ ));
+ };
return (
- <>
-