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>pull/6293/head
parent
0d485ffed6
commit
fa9d72fc0a
|
@ -181,7 +181,9 @@ const ProfileView = () => {
|
|||
};
|
||||
|
||||
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 = {
|
||||
username: user.username || "",
|
||||
|
|
|
@ -54,11 +54,10 @@ export default function Meta({ title, description, backButton, CTA }: MetaType)
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [title, description, backButton, CTA]);
|
||||
|
||||
const title_ = `${title} | ${APP_NAME}`;
|
||||
return (
|
||||
<Head>
|
||||
<title>
|
||||
{title} | {APP_NAME}
|
||||
</title>
|
||||
<title>{title_}</title>
|
||||
<meta name="description" content={description} />
|
||||
</Head>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue