fix: set background color for shared image

This commit is contained in:
ValdiANS
2026-04-27 12:03:09 +07:00
parent 7ab9518a55
commit 5cccc0b3c6
@@ -593,7 +593,9 @@ export function DetailDailyChecklistContent() {
let shareData: ShareData; let shareData: ShareData;
if (isMobile) { if (isMobile) {
const htmlBlob = await htmlToImage.toBlob(document.body); const htmlBlob = await htmlToImage.toBlob(document.body, {
backgroundColor: '#ffffff',
});
const imgFile = new File( const imgFile = new File(
[htmlBlob!], [htmlBlob!],
`daily-checklist-${header?.date}-${header?.kandang_name}-${header?.category}.png`, `daily-checklist-${header?.date}-${header?.kandang_name}-${header?.category}.png`,
@@ -606,7 +608,6 @@ export function DetailDailyChecklistContent() {
files: [imgFile], files: [imgFile],
title: baseTitle, title: baseTitle,
text: fullMessage, text: fullMessage,
url: window.location.href,
}; };
} else { } else {
shareData = { shareData = {