fix/profile-dont-wait-for-avatar (#12080)
* fix/profile-dont-wait-for-avatar * Update apps/web/pages/settings/my-account/profile.tsx * Update apps/web/pages/settings/my-account/profile.tsx --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>pull/11563/head^2
parent
af801df421
commit
327159c2ae
|
@ -78,8 +78,8 @@ type FormValues = {
|
||||||
bio: string;
|
bio: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkIfItFallbackImage = (fetchedImgSrc: string) => {
|
const checkIfItFallbackImage = (fetchedImgSrc?: string) => {
|
||||||
return fetchedImgSrc.endsWith(AVATAR_FALLBACK);
|
return !fetchedImgSrc || fetchedImgSrc.endsWith(AVATAR_FALLBACK);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ProfileView = () => {
|
const ProfileView = () => {
|
||||||
|
@ -226,10 +226,11 @@ const ProfileView = () => {
|
||||||
[ErrorCode.ThirdPartyIdentityProviderEnabled]: t("account_created_with_identity_provider"),
|
[ErrorCode.ThirdPartyIdentityProviderEnabled]: t("account_created_with_identity_provider"),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isLoading || !user || fetchedImgSrc === undefined)
|
if (isLoading || !user) {
|
||||||
return (
|
return (
|
||||||
<SkeletonLoader title={t("profile")} description={t("profile_description", { appName: APP_NAME })} />
|
<SkeletonLoader title={t("profile")} description={t("profile_description", { appName: APP_NAME })} />
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const defaultValues = {
|
const defaultValues = {
|
||||||
username: user.username || "",
|
username: user.username || "",
|
||||||
|
|
Loading…
Reference in New Issue