fix: flash of untranslated title in `settings/my-account/profile` (#6163)
* fix: flash of untranslated content * feat: extract loading into a variable * fix: use optional chaining because typescript complaining * feat: render Meta component even if not loading for seo purpose * fix: received an array with more than 1 element as children warning * fix: changes Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
parent
0d485ffed6
commit
fa9d72fc0a
|
@ -181,7 +181,9 @@ const ProfileView = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isLoading || !user || isLoadingAvatar || !avatar)
|
if (isLoading || !user || isLoadingAvatar || !avatar)
|
||||||
return <SkeletonLoader title={t("profile")} description={t("profile_description")} />;
|
return (
|
||||||
|
<SkeletonLoader title={t("profile")} description={t("profile_description", { appName: APP_NAME })} />
|
||||||
|
);
|
||||||
|
|
||||||
const defaultValues = {
|
const defaultValues = {
|
||||||
username: user.username || "",
|
username: user.username || "",
|
||||||
|
|
|
@ -54,11 +54,10 @@ export default function Meta({ title, description, backButton, CTA }: MetaType)
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [title, description, backButton, CTA]);
|
}, [title, description, backButton, CTA]);
|
||||||
|
|
||||||
|
const title_ = `${title} | ${APP_NAME}`;
|
||||||
return (
|
return (
|
||||||
<Head>
|
<Head>
|
||||||
<title>
|
<title>{title_}</title>
|
||||||
{title} | {APP_NAME}
|
|
||||||
</title>
|
|
||||||
<meta name="description" content={description} />
|
<meta name="description" content={description} />
|
||||||
</Head>
|
</Head>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user