fixed code

This commit is contained in:
SlimusMinus
2026-08-11 00:24:07 +03:00
parent c50b75eece
commit 7f59ee1f38
95 changed files with 3623 additions and 2830 deletions

View File

@@ -0,0 +1,37 @@
import MenuIcon from "../icons/MenuIcon";
import ProfileAvatar from "../profile/ProfileAvatar";
/**
* Общая верхняя панель приложения: бургер-меню слева,
* произвольный контент по центру, профиль/логин справа.
*/
export default function AppTopBar({
onMenuClick,
centerContent,
isAuthenticated,
profileData,
onProfileClick,
onLoginClick,
loginLabel,
}) {
return (
<div className="f-topbar">
<button className="f-menu-btn" onClick={onMenuClick}>
<MenuIcon />
</button>
<div className="f-topbar-center">{centerContent}</div>
{isAuthenticated ? (
<div className="f-topbar-profile" onClick={onProfileClick}>
<ProfileAvatar
avatar={profileData.avatar}
name={`${profileData.firstName || ""} ${profileData.lastName || ""}`}
/>
</div>
) : (
<button className="f-login-btn" onClick={onLoginClick}>
{loginLabel}
</button>
)}
</div>
);
}