feat:
This commit is contained in:
@ -2,7 +2,7 @@ import { Button, Image } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
import { Arrow } from '@taroify/icons';
|
||||
import { Fragment, useCallback, useEffect, useState } from 'react';
|
||||
import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { EventName, OpenSource, PageUrl } from '@/constants/app';
|
||||
import { CITY_CODE_TO_NAME_MAP } from '@/constants/city';
|
||||
@ -46,6 +46,15 @@ export default function InviteOperations() {
|
||||
};
|
||||
}, [handleCityChange]);
|
||||
|
||||
const useCopyRef = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!userInfo.userId) return;
|
||||
if (useCopyRef.current) return;
|
||||
handleCopy();
|
||||
useCopyRef.current = true;
|
||||
}, [handleCopy, userInfo.userId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!cityCode) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user