feat: wrap recording & exit buttons inside user !null check

This commit is contained in:
karishmas6
2024-09-30 16:00:09 +05:30
parent dbbb88ab4f
commit 32de7bd4bb

View File

@@ -54,6 +54,9 @@ export const NavBar = ({ newRecording, recordingName, isRecording }: NavBarProps
return ( return (
<NavBarWrapper> <NavBarWrapper>
{
user !== null ? (
<>
<div style={{ <div style={{
display: 'flex', display: 'flex',
justifyContent: 'flex-start', justifyContent: 'flex-start',
@@ -106,8 +109,6 @@ export const NavBar = ({ newRecording, recordingName, isRecording }: NavBarProps
<MeetingRoomIcon sx={{ marginRight: '5px' }} /> <MeetingRoomIcon sx={{ marginRight: '5px' }} />
exit</Button> exit</Button>
: null} : null}
{
user !== null ? (
<Button sx={{ <Button sx={{
width: '100px', width: '100px',
background: '#fff', background: '#fff',
@@ -121,9 +122,10 @@ export const NavBar = ({ newRecording, recordingName, isRecording }: NavBarProps
}} onClick={logout}> }} onClick={logout}>
<MeetingRoomIcon sx={{ marginRight: '5px' }} /> <MeetingRoomIcon sx={{ marginRight: '5px' }} />
logout</Button> logout</Button>
</div>
</>
) : "" ) : ""
} }
</div>
</NavBarWrapper> </NavBarWrapper>
); );