Commit 916e3f44 authored by m's avatar m

feat: update

parent 38461d4c
import { View, Text, RootPortal, Image } from '@tarojs/components'
import { useCallback, useState } from 'react'
import { useCallback, useEffect, useState } from 'react'
import { useRouter, showToast, showModal, switchTab, useDidShow } from '@tarojs/taro'
import classNames from 'classnames'
import { useStoreActions, useStoreState } from '@/store/hooks'
......@@ -29,10 +29,6 @@ export default function ShareModal () {
const router = useRouter<{ groupId: string, shareUserId: string }>()
const { groupId, shareUserId } = router.params
useDidShow(() => {
showShareModal()
})
// 邀请弹框
const joinTribeWithCode = useCallback(async () => {
if (groupId && shareUserId && +shareUserId !== userInfo.userId) { // 邀请人是不是自己
......@@ -51,6 +47,10 @@ export default function ShareModal () {
}
}, [joinTribeWithCode, fetchTribeInfo])
useEffect(() => {
showShareModal()
}, [showShareModal])
// 加入部落
const { run } = useRequest(joinTribe, {
immediate: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment