mirror of https://github.com/langgenius/dify.git
fix
This commit is contained in:
parent
15d3e4a602
commit
68164a76e4
|
|
@ -31,11 +31,13 @@ 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'
|
||||
|
|
@ -217,6 +219,15 @@ 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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue