You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReactfrom'react'importMenuItemfrom'@material-ui/core/MenuItem'import{navigate}from'@reach/router'// @ts-ignoreimport{useSignOut}from'croods-auth'typeProps={children: React.ReactNode}constSignOut=({ children }: Props)=>{const[,signOut]=useSignOut()consthandleLogout=()=>{signOut()navigate('/login')}return(<MenuItemclassName="text-xs flex gap-2 transition hover:!bg-blue-50"role="button"onClick={handleLogout}>{children}</MenuItem>)}exportdefaultSignOut
Expected Behavior
When called, signOut() should sign out of the application and throw no errors.
Actual Behavior
Calling signOut() throws an error saying that info is null.
Steps to Reproduce the Problem
Using an app with croods auth, login
Logout using signOut()
See error
Additional info
Debugging, I ended up in a croods file in which setList checks if info.id is true. If info is null, this could probably throw an error, as there's no way to check id in a null.
The text was updated successfully, but these errors were encountered:
Example code:
Expected Behavior
When called,
signOut()
should sign out of the application and throw no errors.Actual Behavior
Calling
signOut()
throws an error saying thatinfo is null
.Steps to Reproduce the Problem
signOut()
Additional info
Debugging, I ended up in a
croods
file in whichsetList
checks ifinfo.id
is true. Ifinfo
is null, this could probably throw an error, as there's no way to checkid
in anull
.The text was updated successfully, but these errors were encountered: