chore: align the page name to the right

This commit is contained in:
Rodolfo Ruiz
2025-08-21 20:04:13 -06:00
parent 86dd772e9d
commit cfdad88682
2 changed files with 6 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ export default function AppHeader({ zone = 'public', onSelectMenuItem }) {
}; };
const [drawerExpanded, setDrawerExpanded] = useState(true); const [drawerExpanded, setDrawerExpanded] = useState(true);
const [currentPage, setCurrentPage] = useState('Dashboard'); // track current page const [currentPage, setCurrentPage] = useState('Dashboard');
const { user } = useAuth(); const { user } = useAuth();
const isPrivate = zone === 'private'; const isPrivate = zone === 'private';
@@ -24,10 +24,8 @@ export default function AppHeader({ zone = 'public', onSelectMenuItem }) {
const navigate = useNavigate(); const navigate = useNavigate();
const handleMenuSelect = (page) => { const handleMenuSelect = (page) => {
setCurrentPage(page); // update page title setCurrentPage(page);
onSelectMenuItem?.(page); // still notify parent onSelectMenuItem?.(page);
// you can also navigate if you have routes:
// navigate(`/${page.toLowerCase().replace(/\s+/g, '-')}`);
}; };
return ( return (
@@ -43,8 +41,6 @@ export default function AppHeader({ zone = 'public', onSelectMenuItem }) {
right: 0, right: 0,
}} > }} >
<Toolbar sx={{ justifyContent: 'space-between', flexWrap: 'wrap' }}> <Toolbar sx={{ justifyContent: 'space-between', flexWrap: 'wrap' }}>
{/* LEFT SIDE: Current Page */}
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
@@ -55,7 +51,7 @@ export default function AppHeader({ zone = 'public', onSelectMenuItem }) {
<Typography <Typography
variant="h6" variant="h6"
noWrap noWrap
sx={{ color: '#40120EFF', fontWeight: 600 }} sx={{ color: '#40120EFF', fontWeight:'light', fontSize: '30px'}}
> >
{currentPage} {currentPage}
</Typography> </Typography>

View File

@@ -24,8 +24,8 @@ export default function Footer({ zone = 'public' }) {
<Typography variant="body2"> <Typography variant="body2">
<img src={fendiLogo} alt="Fendi logo" style={{ height: 10, marginRight: 10 }} /> <img src={fendiLogo} alt="Fendi logo" style={{ height: 10, marginRight: 10 }} />
{zone === 'private' {zone === 'private'
? `Admin Panel - Fendi ${year}` ? `Admin Panel - Dream Views ${year}`
: `© ${year} Fendi. All rights reserved.`} : `© ${year} Dream Views. All rights reserved.`}
</Typography> </Typography>
</Box> </Box>
); );