fix: 修改分享初始化逻辑、去除小猫图
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user