fix: streamline error handling in dialogs by removing unnecessary return statements
This commit is contained in:
@@ -50,7 +50,6 @@ export const FormSubscribePlanPage = (properties: TProperties) => {
|
||||
useEffect(() => {
|
||||
if (!fetcher.data?.success && fetcher.data?.message) {
|
||||
toast.error(fetcher.data.message)
|
||||
return
|
||||
}
|
||||
|
||||
if (fetcher.data?.success) {
|
||||
@@ -58,7 +57,6 @@ export const FormSubscribePlanPage = (properties: TProperties) => {
|
||||
`Subscribe Plan berhasil ${subscribePlanData ? 'diupdate' : 'dibuat'}!`,
|
||||
)
|
||||
navigate('/lg-admin/subscribe-plan')
|
||||
return
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [fetcher.data])
|
||||
|
||||
Reference in New Issue
Block a user