feat(mui): consistent staggered page entrance across all 43 route pages
Adopt the PageEnter wrapper as every page's outermost render element and remove the ad-hoc per-page entrance motion.div wrappers. Every page now enters the same way — all top-level sections rise+fade in, staggered — so nothing appears instantly and the motion is identical app-wide. Presentation-only: no data/logic/hooks/invalidate/permissions touched. Embedded sub-tabs (CompanySettings, ReceivedInvoices), Login (auth shell) and the dev UiKit are intentionally excluded. Gates: tsc -b --noEmit=0, build=0, vitest 152/152. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { motion } from "framer-motion";
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Chip from "@mui/material/Chip";
|
||||
@@ -21,6 +20,7 @@ import {
|
||||
TextField,
|
||||
SwitchField,
|
||||
LoadingState,
|
||||
PageEnter,
|
||||
type DataColumn,
|
||||
} from "../ui";
|
||||
|
||||
@@ -299,53 +299,41 @@ export default function Vehicles() {
|
||||
];
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 12 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.25 }}
|
||||
<PageEnter>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mb: 3,
|
||||
flexWrap: "wrap",
|
||||
gap: 2,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mb: 3,
|
||||
flexWrap: "wrap",
|
||||
gap: 2,
|
||||
}}
|
||||
>
|
||||
<Typography variant="h4">Správa vozidel</Typography>
|
||||
<Button startIcon={PlusIcon} onClick={openCreateModal}>
|
||||
Přidat vozidlo
|
||||
</Button>
|
||||
</Box>
|
||||
</motion.div>
|
||||
<Typography variant="h4">Správa vozidel</Typography>
|
||||
<Button startIcon={PlusIcon} onClick={openCreateModal}>
|
||||
Přidat vozidlo
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 12 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.25, delay: 0.06 }}
|
||||
>
|
||||
<Card>
|
||||
<DataTable<Vehicle>
|
||||
columns={columns}
|
||||
rows={vehicles}
|
||||
rowKey={(v) => v.id}
|
||||
rowInactive={(v) => !v.is_active}
|
||||
empty={
|
||||
<Box sx={{ textAlign: "center", py: 6 }}>
|
||||
<Typography color="text.secondary" gutterBottom>
|
||||
Zatím nejsou žádná vozidla.
|
||||
</Typography>
|
||||
<Button startIcon={PlusIcon} onClick={openCreateModal}>
|
||||
Přidat první vozidlo
|
||||
</Button>
|
||||
</Box>
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
</motion.div>
|
||||
<Card>
|
||||
<DataTable<Vehicle>
|
||||
columns={columns}
|
||||
rows={vehicles}
|
||||
rowKey={(v) => v.id}
|
||||
rowInactive={(v) => !v.is_active}
|
||||
empty={
|
||||
<Box sx={{ textAlign: "center", py: 6 }}>
|
||||
<Typography color="text.secondary" gutterBottom>
|
||||
Zatím nejsou žádná vozidla.
|
||||
</Typography>
|
||||
<Button startIcon={PlusIcon} onClick={openCreateModal}>
|
||||
Přidat první vozidlo
|
||||
</Button>
|
||||
</Box>
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Modal
|
||||
isOpen={showModal}
|
||||
@@ -438,6 +426,6 @@ export default function Vehicles() {
|
||||
confirmText="Smazat"
|
||||
confirmVariant="danger"
|
||||
/>
|
||||
</Box>
|
||||
</PageEnter>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user