React-Redux State Management – Created a hook to verify user’s role, but not working properly I have created a hook called useAuth.ts: