feat: show button based on recording state

This commit is contained in:
karishmas6
2024-10-10 21:48:53 +05:30
parent c5312e3d2f
commit 7e5f1b807f

View File

@@ -110,27 +110,25 @@ export const NavBar: React.FC<NavBarProps> = ({ newRecording, recordingName, isR
<Logout sx={{ marginRight: '5px' }} /> <Logout sx={{ marginRight: '5px' }} />
Logout</IconButton> Logout</IconButton>
</> </>
) : "" ) : <Button sx={{
width: '100px',
background: '#fff',
color: 'rgba(25, 118, 210, 0.7)',
padding: '9px',
marginRight: '19px',
'&:hover': {
background: 'white',
color: 'rgb(25, 118, 210)',
}
}} onClick={goToMainMenu}>
<MeetingRoomIcon sx={{ marginRight: '5px' }} />
exit</Button>
} }
{ {
recordingLength > 0 recordingLength > 0
? <SaveRecording fileName={recordingName} /> ? <SaveRecording fileName={recordingName} />
: null : null
} }
{isRecording ? <Button sx={{
width: '100px',
background: '#fff',
color: 'rgba(25, 118, 210, 0.7)',
padding: '9px',
marginRight: '19px',
'&:hover': {
background: 'white',
color: 'rgb(25, 118, 210)',
}
}} onClick={goToMainMenu}>
<MeetingRoomIcon sx={{ marginRight: '5px' }} />
exit</Button>
: null}
</div> </div>
</> </>
) : "" ) : ""