here is the code snapshot of login which I getting the error in. I cannot solve it as a new react user please help.
The navigate function should be called as an intentional side-effect, not in directly in the component body as an unintentional side-effect. Move that logic into an useEffect hook.
Example:
useEffect(() => {
if (user || userGoogle) {
navigate(from, { replace: true });
}
}, [navigate, user, userGoogle]);