fix: correct subscription plan access check in login dialog

This commit is contained in:
Ardeman 2025-03-15 17:03:06 +08:00
parent cc5331284b
commit 4c3a143338

View File

@ -44,7 +44,7 @@ export const DialogLogin = () => {
setError(undefined) setError(undefined)
setIsLoginOpen(false) setIsLoginOpen(false)
if (fetcher.data?.user.subscribe_plan_code === 'basic') { if (fetcher.data?.user.subscribe?.subscribe_plan?.code === 'basic') {
setIsSubscribeOpen(true) setIsSubscribeOpen(true)
} }
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps