chore: align the user name and icons 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');  |   const [currentPage, setCurrentPage] = useState('Dashboard'); | ||||||
|   const { user } = useAuth(); |   const { user } = useAuth(); | ||||||
|  |  | ||||||
|   const isPrivate = zone === 'private'; |   const isPrivate = zone === 'private'; | ||||||
| @@ -25,7 +25,7 @@ export default function AppHeader({ zone = 'public', onSelectMenuItem }) { | |||||||
|  |  | ||||||
|   const handleMenuSelect = (page) => { |   const handleMenuSelect = (page) => { | ||||||
|     setCurrentPage(page); |     setCurrentPage(page); | ||||||
|     onSelectMenuItem?.(page);  |     onSelectMenuItem?.(page); | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   return ( |   return ( | ||||||
| @@ -51,31 +51,30 @@ export default function AppHeader({ zone = 'public', onSelectMenuItem }) { | |||||||
|           <Typography |           <Typography | ||||||
|             variant="h6" |             variant="h6" | ||||||
|             noWrap |             noWrap | ||||||
|             sx={{ color: '#40120EFF', fontWeight:'light', fontSize: '30px'}} |             sx={{ color: '#40120EFF', fontWeight: 'light', fontSize: '30px' }} | ||||||
|           > |           > | ||||||
|             {currentPage} |             {currentPage} | ||||||
|           </Typography> |           </Typography> | ||||||
|         </Box> |         </Box> | ||||||
|  |  | ||||||
|         {/* MIDDLE: Icon Buttons */} |         <Box sx={{ display: 'flex', alignItems: 'center', gap: '10px', ml: 'auto' }}> | ||||||
|         <Box sx={{ display: 'flex', alignItems: 'center' }}> |           <IconButton> | ||||||
|           <IconButton sx={{ mx: 1 }}> |  | ||||||
|             <img src="/refresh.png" alt="Reload" width={24} height={24} /> |             <img src="/refresh.png" alt="Reload" width={24} height={24} /> | ||||||
|           </IconButton> |           </IconButton> | ||||||
|           <IconButton sx={{ mx: 1 }}> |           <IconButton> | ||||||
|             <img src="/alert.png" alt="Notifications" width={24} height={24} /> |             <img src="/alert.png" alt="Notifications" width={24} height={24} /> | ||||||
|           </IconButton> |           </IconButton> | ||||||
|  |  | ||||||
|  |           {user && ( | ||||||
|  |             <Box display="flex" alignItems="center" gap={1}> | ||||||
|  |               <Avatar alt={user.name} src={user.picture} /> | ||||||
|  |               <Typography variant="body1" color="#40120EFF"> | ||||||
|  |                 {user.name} | ||||||
|  |               </Typography> | ||||||
|  |             </Box> | ||||||
|  |           )} | ||||||
|         </Box> |         </Box> | ||||||
|  |  | ||||||
|         {/* RIGHT SIDE: User Info */} |  | ||||||
|         {user && ( |  | ||||||
|           <Box display="flex" alignItems="center" gap={1}> |  | ||||||
|             <Avatar alt={user.name} src={user.picture} /> |  | ||||||
|             <Typography variant="body1" color='#40120EFF'>{user.name}</Typography> |  | ||||||
|           </Box> |  | ||||||
|         )} |  | ||||||
|  |  | ||||||
|         {/* Drawer (kept here for logic; reports expanded/collapsed to header) */} |  | ||||||
|         <MenuDrawer |         <MenuDrawer | ||||||
|           zone="private" |           zone="private" | ||||||
|           onSelect={handleMenuSelect} |           onSelect={handleMenuSelect} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Rodolfo Ruiz
					Rodolfo Ruiz