moved icon profile on up
This commit is contained in:
@@ -7,6 +7,7 @@ import RightSidebar from "./RightSidebar";
|
||||
import PostOnFeed from "./PostOnFeed";
|
||||
import CreateUpdatePost from "./CreateUpdatePost";
|
||||
import MenuIcon from "./icons/MenuIcon";
|
||||
import ProfileAvatar from "./profile/ProfileAvatar";
|
||||
import { ProfileModal } from "./profile";
|
||||
import AuthModal from "./AuthModal";
|
||||
import RulesModal from "./RulesModal";
|
||||
@@ -22,7 +23,7 @@ import { usePostStatus } from "../hooks/usePostStatus";
|
||||
*/
|
||||
export default function MainFeed() {
|
||||
const navigate = useNavigate();
|
||||
const { user, token, isAuthenticated, logout } = useAuthContext();
|
||||
const { user, token, isAuthenticated } = useAuthContext();
|
||||
const { deletePost } = useDeletePost();
|
||||
const { toggleFavorite, loadFavorites } = useFavorites();
|
||||
const { markAsFound } = usePostStatus();
|
||||
@@ -312,13 +313,7 @@ export default function MainFeed() {
|
||||
activeNav={activeNav}
|
||||
onClose={() => setSidebarOpen(false)}
|
||||
onNavClick={setActiveNav}
|
||||
onEditProfile={() => {
|
||||
if (!isAuthenticated) { setAuthModalOpen(true); return; }
|
||||
setProfileModalOpen(true);
|
||||
}}
|
||||
profileData={profileData}
|
||||
isAuthenticated={isAuthenticated}
|
||||
onLogout={logout}
|
||||
onLoginClick={() => setAuthModalOpen(true)}
|
||||
onRulesClick={() => setRulesModalOpen(true)}
|
||||
onReviewsClick={() => navigate("/reviews")}
|
||||
@@ -336,8 +331,14 @@ export default function MainFeed() {
|
||||
Разместить объявление
|
||||
</button>
|
||||
</div>
|
||||
{/* Пустой спейсер симметрично уравновешивает бургер слева */}
|
||||
<div className="f-topbar-spacer" />
|
||||
{/* Иконка профиля в правом углу */}
|
||||
<div className="f-topbar-profile" onClick={() => isAuthenticated ? setProfileModalOpen(true) : setAuthModalOpen(true)}>
|
||||
{isAuthenticated ? (
|
||||
<ProfileAvatar avatar={profileData.avatar} name={`${profileData.firstName || ""} ${profileData.lastName || ""}`} />
|
||||
) : (
|
||||
<span className="f-topbar-login-icon">🔑</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Фильтр по типу объявления */}
|
||||
|
||||
Reference in New Issue
Block a user