show inline error when profile update is unavailable
This commit is contained in:
parent
50da86ab2a
commit
00003266ad
|
@ -129,12 +129,21 @@ const EditProfileForm = ({
|
|||
<InlineNotification type="error" desc={updateError} />
|
||||
</div>
|
||||
) : null}
|
||||
{!profile ? (
|
||||
<div className="py-3">
|
||||
<InlineNotification
|
||||
type="error"
|
||||
desc={t('profile:profile-api-error')}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
<div className="my-6 flex justify-center">
|
||||
<div className="relative ">
|
||||
<IconButton
|
||||
className="absolute -top-2 -right-2 bg-th-button md:hover:bg-th-button-hover"
|
||||
size="small"
|
||||
onClick={onEditProfileImage}
|
||||
disabled={!profile}
|
||||
>
|
||||
{profile?.profile_image_url ? (
|
||||
<PencilIcon className="h-4 w-4" />
|
||||
|
@ -186,7 +195,8 @@ const EditProfileForm = ({
|
|||
disabled={
|
||||
!!Object.keys(inputError).length ||
|
||||
loadUniquenessCheck ||
|
||||
!profileName
|
||||
!profileName ||
|
||||
!profile
|
||||
}
|
||||
onClick={saveProfile}
|
||||
size="large"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"no-nfts": "😞 No NFTs found...",
|
||||
"no-profile-exists": "This profile doesn't exist...",
|
||||
"profile": "Profile",
|
||||
"profile-api-error": "Profile update is unavailable. Please try again later",
|
||||
"profile-fetch-fail": "Failed to fetch profile details",
|
||||
"profile-name": "Profile Name",
|
||||
"profile-pic-failure": "Failed to set profile pic",
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
"no-following": "No Accounts Followed",
|
||||
"no-following-desc": "The lone sheep is in danger of the wolf",
|
||||
"no-nfts": "😞 No NFTs found...",
|
||||
"profile": "Profile",
|
||||
"no-profile-exists": "This profile doesn't exist...",
|
||||
"profile": "Profile",
|
||||
"profile-api-error": "Profile update is unavailable. Please try again later",
|
||||
"profile-fetch-fail": "Failed to fetch profile details",
|
||||
"profile-name": "Profile Name",
|
||||
"profile-pic-failure": "Failed to set profile pic",
|
||||
|
|
|
@ -1,43 +1,44 @@
|
|||
{
|
||||
"browse-profiles": "瀏覽",
|
||||
"choose-profile": "選擇頭像",
|
||||
"connect-view-profile": "連接錢包來查看帳戶",
|
||||
"day-trader": "日內交易者",
|
||||
"browse-profiles": "Browse",
|
||||
"choose-profile": "Profile Image",
|
||||
"connect-view-profile": "Connect your wallet to view your profile",
|
||||
"day-trader": "Day Trader",
|
||||
"degen": "Degen",
|
||||
"discretionary": "零錢",
|
||||
"edit-profile": "編輯帳戶",
|
||||
"edit-profile-pic": "切換頭像",
|
||||
"follow": "追蹤",
|
||||
"following": "追蹤中",
|
||||
"invalid-characters": "限制於字母、数字和空格",
|
||||
"discretionary": "Discretionary",
|
||||
"edit-profile": "Edit Profile",
|
||||
"edit-profile-pic": "Edit Profile Pic",
|
||||
"follow": "Follow",
|
||||
"following": "Following",
|
||||
"invalid-characters": "Only alphanumeric characters and single spaces allowed",
|
||||
"length-error": "Names must be less than 20 characters",
|
||||
"market-maker": "做市商",
|
||||
"no-followers": "無追蹤者",
|
||||
"no-followers-desc": "以隱身模式交易😎",
|
||||
"no-following": "還沒追蹤別帳戶",
|
||||
"no-following-desc": "跟朋友團結比較安全吧",
|
||||
"no-nfts": "😞 未找到NFT...",
|
||||
"no-profile-exists": "此帳戶不存在...",
|
||||
"profile": "帳戶",
|
||||
"profile-fetch-fail": "查帳戶細節出錯",
|
||||
"profile-name": "帳戶標籤",
|
||||
"profile-pic-failure": "設置頭像失敗",
|
||||
"profile-pic-success": "設置頭像成功",
|
||||
"profile-pic-remove-failure": "刪除頭像失敗",
|
||||
"profile-pic-remove-success": "刪除頭像成功",
|
||||
"profile-update-fail": "更新帳戶出錯",
|
||||
"profile-update-success": "帳戶已更新",
|
||||
"remove": "刪除",
|
||||
"save-profile": "保存帳戶",
|
||||
"set-profile-pic": "設置頭像",
|
||||
"swing-trader": "擺動交易者",
|
||||
"total-pnl": "組合總盈虧",
|
||||
"total-value": "組合總價值",
|
||||
"trader": "交易者",
|
||||
"trader-category": "交易模式",
|
||||
"unfollow": "取消追蹤",
|
||||
"market-maker": "Market Maker",
|
||||
"no-followers": "No Followers",
|
||||
"no-followers-desc": "Trading in stealth mode 😎",
|
||||
"no-following": "No Accounts Followed",
|
||||
"no-following-desc": "The lone sheep is in danger of the wolf",
|
||||
"no-nfts": "😞 No NFTs found...",
|
||||
"no-profile-exists": "This profile doesn't exist...",
|
||||
"profile": "Profile",
|
||||
"profile-api-error": "Profile update is unavailable. Please try again later",
|
||||
"profile-fetch-fail": "Failed to fetch profile details",
|
||||
"profile-name": "Profile Name",
|
||||
"profile-pic-failure": "Failed to set profile pic",
|
||||
"profile-pic-success": "Successfully set profile pic",
|
||||
"profile-pic-remove-failure": "Failed to remove profile pic",
|
||||
"profile-pic-remove-success": "Successfully removed profile pic",
|
||||
"profile-update-fail": "Failed to update profile",
|
||||
"profile-update-success": "Profile updated",
|
||||
"remove": "Remove",
|
||||
"save-profile": "Save Profile",
|
||||
"set-profile-pic": "Set Profile Pic",
|
||||
"swing-trader": "Swing Trader",
|
||||
"total-pnl": "Total Portfolio PnL",
|
||||
"total-value": "Total Portfolio Value",
|
||||
"trader": "Trader",
|
||||
"trader-category": "Trader Category",
|
||||
"unfollow": "Unfollow",
|
||||
"uniqueness-api-fail": "Failed to check profile name uniqueness",
|
||||
"uniqueness-fail": "Profile name is taken. Try another one",
|
||||
"yolo": "YOLO",
|
||||
"your-profile": "您的帳戶"
|
||||
}
|
||||
"your-profile": "Your Profile"
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
"no-nfts": "😞 未找到NFT...",
|
||||
"no-profile-exists": "此帐户不存在...",
|
||||
"profile": "帐户",
|
||||
"profile-api-error": "Profile update is unavailable. Please try again later",
|
||||
"profile-fetch-fail": "查帐户细节出错",
|
||||
"profile-name": "帐户标签",
|
||||
"profile-pic-failure": "设置头像失败",
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"no-nfts": "😞 未找到NFT...",
|
||||
"no-profile-exists": "此帳戶不存在...",
|
||||
"profile": "帳戶",
|
||||
"profile-api-error": "Profile update is unavailable. Please try again later",
|
||||
"profile-fetch-fail": "查帳戶細節出錯",
|
||||
"profile-name": "帳戶標籤",
|
||||
"profile-pic-failure": "設置頭像失敗",
|
||||
|
|
Loading…
Reference in New Issue