From 7a31cb9064250dc99365ce41bd274c194de765f3 Mon Sep 17 00:00:00 2001 From: yyh Date: Fri, 26 Dec 2025 12:44:31 +0800 Subject: [PATCH] clean --- web/app/education-apply/constants.ts | 1 - web/app/education-apply/hooks.ts | 4 ---- web/context/modal-context.tsx | 11 ----------- 3 files changed, 16 deletions(-) diff --git a/web/app/education-apply/constants.ts b/web/app/education-apply/constants.ts index 2c42d2b263..cfe80556c6 100644 --- a/web/app/education-apply/constants.ts +++ b/web/app/education-apply/constants.ts @@ -1,4 +1,3 @@ export const EDUCATION_VERIFY_URL_SEARCHPARAMS_ACTION = 'getEducationVerify' export const EDUCATION_VERIFYING_LOCALSTORAGE_ITEM = 'educationVerifying' -export const EDUCATION_PRICING_SHOW_ACTION = 'educationPricing' export const EDUCATION_RE_VERIFY_ACTION = 'educationReVerify' diff --git a/web/app/education-apply/hooks.ts b/web/app/education-apply/hooks.ts index 27895b89be..52acde2975 100644 --- a/web/app/education-apply/hooks.ts +++ b/web/app/education-apply/hooks.ts @@ -15,7 +15,6 @@ import { useModalContextSelector } from '@/context/modal-context' import { useProviderContext } from '@/context/provider-context' import { useEducationAutocomplete, useEducationVerify } from '@/service/use-education' import { - EDUCATION_PRICING_SHOW_ACTION, EDUCATION_RE_VERIFY_ACTION, EDUCATION_VERIFY_URL_SEARCHPARAMS_ACTION, EDUCATION_VERIFYING_LOCALSTORAGE_ITEM, @@ -133,7 +132,6 @@ const useEducationReverifyNotice = ({ export const useEducationInit = () => { const setShowAccountSettingModal = useModalContextSelector(s => s.setShowAccountSettingModal) - const setShowPricingModal = useModalContextSelector(s => s.setShowPricingModal) const setShowEducationExpireNoticeModal = useModalContextSelector(s => s.setShowEducationExpireNoticeModal) const educationVerifying = localStorage.getItem(EDUCATION_VERIFYING_LOCALSTORAGE_ITEM) const searchParams = useSearchParams() @@ -160,8 +158,6 @@ export const useEducationInit = () => { if (educationVerifyAction === EDUCATION_VERIFY_URL_SEARCHPARAMS_ACTION) localStorage.setItem(EDUCATION_VERIFYING_LOCALSTORAGE_ITEM, 'yes') } - if (educationVerifyAction === EDUCATION_PRICING_SHOW_ACTION) - setShowPricingModal() if (educationVerifyAction === EDUCATION_RE_VERIFY_ACTION) handleVerify() }, [setShowAccountSettingModal, educationVerifying, educationVerifyAction]) diff --git a/web/context/modal-context.tsx b/web/context/modal-context.tsx index 69091f591c..dce7b9f6e1 100644 --- a/web/context/modal-context.tsx +++ b/web/context/modal-context.tsx @@ -31,13 +31,11 @@ import { isValidAccountSettingTab, } from '@/app/components/header/account-setting/constants' import { - EDUCATION_PRICING_SHOW_ACTION, EDUCATION_VERIFYING_LOCALSTORAGE_ITEM, } from '@/app/education-apply/constants' import { useAppContext } from '@/context/app-context' import { useProviderContext } from '@/context/provider-context' import { - clearQueryParams, useAccountSettingModal, usePricingModal, } from '@/hooks/use-query-params' @@ -219,15 +217,6 @@ export const ModalContextProvider = ({ accountSettingCallbacksRef.current = null }, [urlAccountModalState.isOpen]) - useEffect(() => { - if (!showPricingModal || typeof window === 'undefined') - return - const url = new URL(window.location.href) - if (url.searchParams.get('action') !== EDUCATION_PRICING_SHOW_ACTION) - return - clearQueryParams('action') - }, [showPricingModal]) - const { plan, isFetchedPlan } = useProviderContext() const { showTriggerEventsLimitModal,