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 router = useRouter();
|
||||||
|
|
||||||
const backButtonRef = useRef<HTMLButtonElement>(null);
|
const backButtonRef = useRef<HTMLButtonElement>(null);
|
||||||
const [isButtonInView, setIsButtonInView] = useState(true);
|
const [isButtonInView, setIsButtonInView] = useState(false);
|
||||||
|
|
||||||
const { data: teamSubPlan } = useRequest2(getTeamPlanStatus, {
|
const { data: teamSubPlan } = useRequest2(getTeamPlanStatus, {
|
||||||
manual: false,
|
manual: false,
|
||||||
|
|
@ -30,6 +30,11 @@ const PriceBox = () => {
|
||||||
|
|
||||||
// TODO: 封装成一个 hook 来判断滚动态
|
// TODO: 封装成一个 hook 来判断滚动态
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!teamSubPlan?.standard?.teamId) {
|
||||||
|
setIsButtonInView(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
([entry]) => {
|
([entry]) => {
|
||||||
setIsButtonInView(entry.isIntersecting);
|
setIsButtonInView(entry.isIntersecting);
|
||||||
|
|
@ -50,7 +55,7 @@ const PriceBox = () => {
|
||||||
}
|
}
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
};
|
};
|
||||||
}, []);
|
}, [teamSubPlan?.standard?.teamId]);
|
||||||
|
|
||||||
const onPaySuccess = () => {
|
const onPaySuccess = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue