feat: adding change hero

This commit is contained in:
Chubby Granny Chaser 2024-10-05 02:22:43 +01:00
parent 035e424a76
commit 4222fcec52
No known key found for this signature in database

View file

@ -274,15 +274,7 @@ export function ProfileHero() {
if (filePaths && filePaths.length > 0) { if (filePaths && filePaths.length > 0) {
const path = filePaths[0]; const path = filePaths[0];
const { imagePath } = await window.electron setHero(path);
.processProfileImage(path)
.catch(() => {
showErrorToast(t("image_process_failure"));
return { imagePath: null };
});
console.log("imagePath", imagePath);
setHero(imagePath);
// onChange(imagePath); // onChange(imagePath);
} }
@ -292,7 +284,7 @@ export function ProfileHero() {
if (hero) return `local:${hero}`; if (hero) return `local:${hero}`;
// if (userDetails?.profileImageUrl) return userDetails.profileImageUrl; // if (userDetails?.profileImageUrl) return userDetails.profileImageUrl;
return null; return "";
}; };
// const imageUrl = getImageUrl(); // const imageUrl = getImageUrl();