feat: bring back update button

This commit is contained in:
amhsirak
2024-12-21 18:46:43 +05:30
parent e3f3dafe83
commit f102b6cf03

View File

@@ -67,7 +67,6 @@ export const NavBar: React.FC<NavBarProps> = ({
setTab(newValue);
};
const handleMenuOpen = (event: React.MouseEvent<HTMLElement>) => {
setAnchorEl(event.currentTarget);
};
@@ -116,6 +115,50 @@ export const NavBar: React.FC<NavBarProps> = ({
return (
<>
{isUpdateAvailable && (
<Snackbar
open={isUpdateAvailable}
onClose={() => setIsUpdateAvailable(false)}
message={
`New version ${latestVersion} available! Click "Upgrade" to update.`
}
action={
<>
<Button
color="primary"
size="small"
onClick={handleUpdateOpen}
style={{
backgroundColor: '#ff00c3',
color: 'white',
fontWeight: 'bold',
textTransform: 'none',
marginRight: '8px',
borderRadius: '5px',
}}
>
Upgrade
</Button>
<IconButton
size="small"
aria-label="close"
color="inherit"
onClick={() => setIsUpdateAvailable(false)}
style={{ color: 'black' }}
>
<Close />
</IconButton>
</>
}
ContentProps={{
sx: {
background: "white",
color: "black",
}
}}
/>
)}
<NavBarWrapper>
<div style={{
display: 'flex',