fix: 修改分享初始化逻辑、去除小猫图

This commit is contained in:
2026-02-08 23:58:37 +08:00
parent 70a66fabdc
commit 28955e9da1
3 changed files with 38 additions and 27 deletions

View File

@@ -54,12 +54,6 @@ function Index() {
await waitForAuthInit();
// 然后再获取用户信息
await fetchUserInfo();
await delay(1000);
if (from === "publish") {
handleShare(true);
}
};
init();
}, []);
@@ -126,8 +120,12 @@ function Index() {
}
}
function handleShare(flag = false) {
sharePopupRef.current.show(flag);
function handleShare() {
if (!detail.id) {
toast("球局未加载完成,请稍后再试");
return false;
}
sharePopupRef.current.show();
}
const handleJoinGame = async () => {
@@ -293,13 +291,15 @@ function Index() {
currentUserInfo={myInfo}
/>
{/* share popup */}
<SharePopup
ref={sharePopupRef}
id={id as string}
from={from as string}
detail={detail}
userInfo={myInfo}
/>
{detail.id && myInfo.id && (
<SharePopup
ref={sharePopupRef}
id={id as string}
from={from as string}
detail={detail}
userInfo={myInfo}
/>
)}
</View>
</ScrollView>
);