chore: align the page name to the right
This commit is contained in:
		| @@ -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> | ||||||
|   | |||||||
| @@ -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> | ||||||
|     ); |     ); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Rodolfo Ruiz
					Rodolfo Ruiz