deleted likes
This commit is contained in:
@@ -11,12 +11,14 @@ import { useLanguageToggle } from "../hooks/useLanguageToggle";
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import SupportModal from "./SupportModal";
|
import SupportModal from "./SupportModal";
|
||||||
import ProfileAvatar from "./profile/ProfileAvatar";
|
import ProfileAvatar from "./profile/ProfileAvatar";
|
||||||
|
import NahodkaLogo from "./NahodkaLogo";
|
||||||
|
|
||||||
export default function Sidebar({
|
export default function Sidebar({
|
||||||
open,
|
open,
|
||||||
activeNav,
|
activeNav,
|
||||||
onClose,
|
onClose,
|
||||||
onNavClick,
|
onNavClick,
|
||||||
|
onLogoClick,
|
||||||
isAuthenticated,
|
isAuthenticated,
|
||||||
onLoginClick,
|
onLoginClick,
|
||||||
onRulesClick,
|
onRulesClick,
|
||||||
@@ -66,6 +68,17 @@ export default function Sidebar({
|
|||||||
<div className={`f-overlay${open ? " show" : ""}`} onClick={onClose} />
|
<div className={`f-overlay${open ? " show" : ""}`} onClick={onClose} />
|
||||||
<div className={`f-sidebar${open ? " open" : ""}`}>
|
<div className={`f-sidebar${open ? " open" : ""}`}>
|
||||||
<div className="f-sb-head">
|
<div className="f-sb-head">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="f-sb-logo-btn"
|
||||||
|
onClick={() => {
|
||||||
|
onLogoClick?.();
|
||||||
|
onClose();
|
||||||
|
}}
|
||||||
|
title={t('nav.home')}
|
||||||
|
>
|
||||||
|
<NahodkaLogo />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<nav className="f-sb-nav">
|
<nav className="f-sb-nav">
|
||||||
{NAV_ITEMS.map(({ icon, key: itemKey, labelKey }) => {
|
{NAV_ITEMS.map(({ icon, key: itemKey, labelKey }) => {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ export const NAV_ITEMS = [
|
|||||||
{ icon: "box", key: "items", labelKey: "nav.items" },
|
{ icon: "box", key: "items", labelKey: "nav.items" },
|
||||||
{ icon: "paw", key: "pets", labelKey: "nav.pets" },
|
{ icon: "paw", key: "pets", labelKey: "nav.pets" },
|
||||||
{ icon: "file", key: "myads", labelKey: "nav.myAds" },
|
{ icon: "file", key: "myads", labelKey: "nav.myAds" },
|
||||||
{ icon: "heart", key: "favorites", labelKey: "nav.favorites" },
|
|
||||||
{ icon: "plus", key: "create", labelKey: "nav.create" },
|
{ icon: "plus", key: "create", labelKey: "nav.create" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -396,6 +396,7 @@ export default function MainFeed() {
|
|||||||
open={sidebarOpen}
|
open={sidebarOpen}
|
||||||
activeNav={activeNav}
|
activeNav={activeNav}
|
||||||
onClose={() => setSidebarOpen(false)}
|
onClose={() => setSidebarOpen(false)}
|
||||||
|
onLogoClick={handleHomeClick}
|
||||||
onNavClick={(key: string) => {
|
onNavClick={(key: string) => {
|
||||||
setActiveNav(key);
|
setActiveNav(key);
|
||||||
setSearchQuery("");
|
setSearchQuery("");
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import {useRef, useState, useEffect} from "react";
|
|||||||
import PinIcon from "../components/icons/PinIcon";
|
import PinIcon from "../components/icons/PinIcon";
|
||||||
import CalendarIcon from "../components/icons/CalendarIcon";
|
import CalendarIcon from "../components/icons/CalendarIcon";
|
||||||
import PhoneIcon from "../components/icons/PhoneIcon";
|
import PhoneIcon from "../components/icons/PhoneIcon";
|
||||||
import HeartIcon from "../components/icons/HeartIcon";
|
|
||||||
import TrashIcon from "../components/icons/TrashIcon";
|
import TrashIcon from "../components/icons/TrashIcon";
|
||||||
import {useContactSeller} from "../hooks/useContactSeller";
|
import {useContactSeller} from "../hooks/useContactSeller";
|
||||||
import {useAuthContext} from "../context/AuthContext";
|
import {useAuthContext} from "../context/AuthContext";
|
||||||
@@ -12,7 +11,7 @@ import RewardPopup from "../components/feed/RewardPopup";
|
|||||||
import Toast from "../components/Toast";
|
import Toast from "../components/Toast";
|
||||||
import {useTranslation} from 'react-i18next';
|
import {useTranslation} from 'react-i18next';
|
||||||
|
|
||||||
export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, onDelete, onMarkFound, isOwner, onImageClick, onLocationClick, onAuthRequired, compact }) {
|
export default function PostOnFeed({ ad, onEdit, onDelete, onMarkFound, isOwner, onImageClick, onLocationClick, onAuthRequired, compact }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [showCalendar, setShowCalendar] = useState(false);
|
const [showCalendar, setShowCalendar] = useState(false);
|
||||||
const [showReward, setShowReward] = useState(false);
|
const [showReward, setShowReward] = useState(false);
|
||||||
@@ -89,15 +88,18 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on
|
|||||||
{!compact && (
|
{!compact && (
|
||||||
<div className="f-card-actions">
|
<div className="f-card-actions">
|
||||||
<div className="f-card-actions-left">
|
<div className="f-card-actions-left">
|
||||||
<button type="button"
|
{address && (
|
||||||
className={`f-card-icon-btn${liked ? " liked" : ""}`}
|
<div
|
||||||
|
className="f-meta-pill f-loc-pill"
|
||||||
|
title={t('postCard.showOnMap', { address })}
|
||||||
onClick={e => {
|
onClick={e => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onLike(ad.id);
|
onLocationClick?.(ad);
|
||||||
}}>
|
}}
|
||||||
<HeartIcon filled={liked}/>
|
>
|
||||||
</button>
|
<PinIcon/> {address}
|
||||||
<span className="f-card-like-count">{(ad.likeCount || 0) + likeCountAdj}</span>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="f-card-actions-right">
|
<div className="f-card-actions-right">
|
||||||
{onEdit && isOwner && !isClosed && (
|
{onEdit && isOwner && !isClosed && (
|
||||||
@@ -153,18 +155,6 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on
|
|||||||
|
|
||||||
{!compact && (
|
{!compact && (
|
||||||
<div className="f-card-meta">
|
<div className="f-card-meta">
|
||||||
{address && (
|
|
||||||
<div
|
|
||||||
className="f-meta-pill f-loc-pill"
|
|
||||||
title={t('postCard.showOnMap', { address })}
|
|
||||||
onClick={e => {
|
|
||||||
e.stopPropagation();
|
|
||||||
onLocationClick?.(ad);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<PinIcon/> {address}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{ad.reward && (
|
{ad.reward && (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -88,25 +88,6 @@
|
|||||||
.f-card-actions-left, .f-card-actions-right {
|
.f-card-actions-left, .f-card-actions-right {
|
||||||
display: flex; align-items: center; gap: 6px;
|
display: flex; align-items: center; gap: 6px;
|
||||||
}
|
}
|
||||||
.f-card-icon-btn {
|
|
||||||
background: none; border: none; cursor: pointer;
|
|
||||||
color: var(--text-primary);
|
|
||||||
width: 38px; height: 38px;
|
|
||||||
display: flex; align-items: center; justify-content: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
transition: background .15s, transform .15s, color .15s;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.f-card-icon-btn:hover { background: var(--hover-bg); transform: scale(1.08); }
|
|
||||||
.f-card-icon-btn:active { transform: scale(.92); }
|
|
||||||
.f-card-icon-btn.liked { color: #ed4956; }
|
|
||||||
.f-card-icon-btn.liked svg { fill: #ed4956; stroke: #ed4956; }
|
|
||||||
.f-card-icon-btn svg { transition: transform .15s; width: 24px; height: 24px; }
|
|
||||||
|
|
||||||
.f-card-like-count {
|
|
||||||
color: var(--text-primary); font-weight: 800; font-size: .9rem;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.f-card-reward-text {
|
.f-card-reward-text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -220,13 +201,9 @@ button.f-card-reward-btn:focus-visible {
|
|||||||
|
|
||||||
/* ── Meta pills ── */
|
/* ── Meta pills ── */
|
||||||
.f-card-meta {
|
.f-card-meta {
|
||||||
display: flex; flex-wrap: wrap; align-items: center;
|
display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
|
||||||
gap: 6px; padding: 8px 16px 4px;
|
gap: 6px; padding: 8px 16px 4px;
|
||||||
}
|
}
|
||||||
.f-card-meta .f-date-pill,
|
|
||||||
.f-card-meta .f-card-reward-text {
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
.f-meta-pill {
|
.f-meta-pill {
|
||||||
display: inline-flex; align-items: center; gap: 4px;
|
display: inline-flex; align-items: center; gap: 4px;
|
||||||
background: rgba(var(--teal-rgb), .1);
|
background: rgba(var(--teal-rgb), .1);
|
||||||
|
|||||||
@@ -1,9 +1,25 @@
|
|||||||
/* ── Left Navigation (Instagram-style) ── */
|
/* ── Left Navigation (Instagram-style) ── */
|
||||||
|
|
||||||
.f-sb-head {
|
.f-sb-head {
|
||||||
padding: 0;
|
padding: 12px 12px 4px;
|
||||||
display: flex; align-items: center; gap: 11px;
|
display: flex; align-items: center; gap: 11px;
|
||||||
}
|
}
|
||||||
|
.f-sb-logo-btn {
|
||||||
|
display: flex; align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
background: none; border: none; cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
transition: filter .15s, transform .15s;
|
||||||
|
}
|
||||||
|
.f-sb-logo-btn:hover { filter: brightness(1.08); transform: scale(1.02); }
|
||||||
|
.f-sb-logo-btn:active { transform: scale(.97); }
|
||||||
|
.f-sb-logo-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
|
||||||
|
.f-sb-logo-btn svg {
|
||||||
|
height: 40px;
|
||||||
|
width: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
.f-sb-logo {
|
.f-sb-logo {
|
||||||
width: 40px; height: 40px;
|
width: 40px; height: 40px;
|
||||||
background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
|
background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
|
||||||
|
|||||||
Reference in New Issue
Block a user