feat: display custom app logo saved by user from console app

This commit is contained in:
RaktimaNXG
2024-04-04 19:28:45 +05:30
parent 8dde38edf1
commit babd43e710
4 changed files with 54 additions and 6 deletions
+16
View File
@@ -1777,3 +1777,19 @@ export const handleCopyNextToWidget = (
setXyPostion(updatePlaceholder);
}
};
//fetch tenant app logo from `partners_Tenant` class by domain name
export const getAppLogo = async () => {
const domainName = window.location.host;
try {
const tenantCreditsQuery = new Parse.Query("partners_Tenant");
tenantCreditsQuery.equalTo("Domain", domainName);
const res = await tenantCreditsQuery.first();
if (res) {
const updateRes = JSON.parse(JSON.stringify(res));
return updateRes?.Logo;
}
} catch (e) {
return null;
}
};