feat: update subscription handling in context and components

This commit is contained in:
Ardeman
2025-03-03 08:41:38 +08:00
parent 722966f50e
commit a594227026
7 changed files with 116 additions and 28 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ export const FormLogin = () => {
setIsRegisterOpen,
setIsLoginOpen,
setIsForgetOpen,
setIsInitSubscribeOpen,
setIsSubscribeOpen,
} = useNewsContext()
const fetcher = useFetcher()
const [error, setError] = useState<string>()
@@ -46,7 +46,7 @@ export const FormLogin = () => {
setIsLoginOpen(false)
if (fetcher.data?.user.subscribe_plan_code === 'basic') {
setIsInitSubscribeOpen(true)
setIsSubscribeOpen(true)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher])