feat: use user.handle default to share profile url

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-09-19 15:06:45 +08:00
parent 4fb1487576
commit 36d51d96f8
7 changed files with 145 additions and 123 deletions
@@ -217,7 +217,9 @@ export const UserProfileModalContent: FC<{
<ActionButton
tooltip={t("user_profile.share")}
onClick={() => {
window.open(`${env.VITE_WEB_URL}/profile/${user.data?.id}`)
window.open(
`${env.VITE_WEB_URL}/profile/${user.data?.handle ? `@${user.data.handle}` : user.data?.id}`,
)
}}
>
<i className="i-mgc-share-3-cute-re" />