feat: update subscription handling in context and components
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user