Skip to content
Snippets Groups Projects
Commit 9ef7f41b authored by henry anand's avatar henry anand
Browse files

fix : add null safety in userInfo

parent 41482e23
No related merge requests found
......@@ -94,11 +94,11 @@ const MobileNav = ({ onOpen, ...rest }: MobileProps) => {
ml="2"
>
{/* NAME */}
<Text fontSize="sm">{userInfo.name}</Text>
<Text fontSize="sm">{userInfo?.name}</Text>
{/* ROLE */}
<Text fontSize="xs" color="gray.600">
{userInfo.role.charAt(0).toUpperCase() +
userInfo.role.slice(1)}
{userInfo.role?.charAt(0).toUpperCase() +
userInfo.role?.slice(1)}
</Text>
</VStack>
<Box display={{ base: "none", md: "flex" }}>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment