fix(ui): Fix timers view broken by the grid2 migration

This commit is contained in:
Sören Beye 2025-03-12 20:48:50 +01:00
parent e42adcb709
commit b7de2f32db

View File

@ -80,7 +80,7 @@ const Timers = (): React.ReactElement => {
};
return (
<Grid2 size="grow" key={id}>
<Grid2 key={id}>
<TimerCard
onDelete={onDelete}
onSave={onSave}
@ -115,18 +115,7 @@ const Timers = (): React.ReactElement => {
return (
<PaperContainer>
<Grid2 container>
<Grid2 size={(timerCards?.length ?? 0) > 0 ? "auto" : "grow"} container spacing={2} sx={{justifyContent: "center"}}>
{
timerCards && timerCards.length > 0 ?
timerCards :
<Typography
sx={{padding:"1rem", textAlign: "center", marginTop: "10vh", marginBottom: "5vh"}}
>
You currently don&apos;t have any timers configured in Valetudo.
</Typography>
}
</Grid2>
<Grid2 container direction="column">
<Grid2 sx={{marginLeft: "auto", height: "4rem"}}>
<IconButton
onClick={() => {
@ -137,6 +126,17 @@ const Timers = (): React.ReactElement => {
<HelpIcon/>
</IconButton>
</Grid2>
<Grid2 container spacing={2} sx={{justifyContent: "center"}}>
{
timerCards && timerCards.length > 0 ?
timerCards :
<Typography
sx={{padding:"1rem", textAlign: "center", marginTop: "10vh", marginBottom: "5vh"}}
>
You currently don&apos;t have any timers configured in Valetudo.
</Typography>
}
</Grid2>
</Grid2>
{