social icon fix export

This commit is contained in:
hamid zarghami
2025-08-17 13:01:59 +03:30
parent 5c5df9556f
commit f011f4369c
@@ -324,7 +324,12 @@ export const exportPersonalityToHTML = async (
// Check if PNG icon is available, if so use it
if (hasPngIcon(networkType, iconPack)) {
const iconPath = getSocialIconPath(networkType, iconPack);
return `<img src="${iconPath}" alt="${networkType} icon" style="width: 100%; height: 100%; object-fit: contain; display: block;" />`;
const BASE = "https://dmail-admin.danakcorp.com";
const absolute = iconPath.startsWith("/")
? `${BASE}${iconPath}`
: iconPath;
const safeUrl = encodeURI(absolute);
return `<img src="${safeUrl}" alt="${networkType} icon" style="width: 100%; height: 100%; object-fit: contain; display: block;" />`;
}
// Use shared SVG function