mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: price page back button display (#6060)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
This commit is contained in:
parent
bdee2db74a
commit
d354fd4d67
|
|
@ -21,7 +21,7 @@ const PriceBox = () => {
|
|||
const router = useRouter();
|
||||
|
||||
const backButtonRef = useRef<HTMLButtonElement>(null);
|
||||
const [isButtonInView, setIsButtonInView] = useState(true);
|
||||
const [isButtonInView, setIsButtonInView] = useState(false);
|
||||
|
||||
const { data: teamSubPlan } = useRequest2(getTeamPlanStatus, {
|
||||
manual: false,
|
||||
|
|
@ -30,6 +30,11 @@ const PriceBox = () => {
|
|||
|
||||
// TODO: 封装成一个 hook 来判断滚动态
|
||||
useEffect(() => {
|
||||
if (!teamSubPlan?.standard?.teamId) {
|
||||
setIsButtonInView(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
([entry]) => {
|
||||
setIsButtonInView(entry.isIntersecting);
|
||||
|
|
@ -50,7 +55,7 @@ const PriceBox = () => {
|
|||
}
|
||||
observer.disconnect();
|
||||
};
|
||||
}, []);
|
||||
}, [teamSubPlan?.standard?.teamId]);
|
||||
|
||||
const onPaySuccess = () => {
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue