setLanguage(value === 'en' ? 'en' : 'ru')}
- options={supportedLanguages.map((value) => ({
- value,
- label: t(`language.${value}`),
- }))}
- />
- {t('settings.profile.username')}
- {user.username}
-
-
- {t('settings.profile.userId')}
- - {user.id}
-
- {t('settings.profile.badges')}
-
@@ -260,6 +288,13 @@ export function ProfileForm({ user }: { user: User }) {
+ {avatarError === null ? null : (
+
+ {avatarError}
+
+ )}
+ {upload.isError ? : null}
+ {removeAvatar.isError ? : null}
{save.isError ? : null}
{saved && !save.isError ? (
@@ -275,62 +310,6 @@ export function ProfileForm({ user }: { user: User }) {
-
-
- {avatar.preview === null ? (
-
- ) : (
-

- )}
-
-
-
- {user.avatar_file_id === undefined ? null : (
-
- )}
-
- {t('settings.profile.avatar.limit', {
- limit: formatBytes(AVATAR_MAX_BYTES, locale),
- })}
-
-
-
-
- {avatarError === null ? null : (
-
- {avatarError}
-
- )}
- {upload.isError ? : null}
- {removeAvatar.isError ? : null}
-
-
- {tab === 'main' ? : }
+ {tab === 'main' ? : }