deleted likes
This commit is contained in:
@@ -396,6 +396,7 @@ export default function MainFeed() {
|
||||
open={sidebarOpen}
|
||||
activeNav={activeNav}
|
||||
onClose={() => setSidebarOpen(false)}
|
||||
onLogoClick={handleHomeClick}
|
||||
onNavClick={(key: string) => {
|
||||
setActiveNav(key);
|
||||
setSearchQuery("");
|
||||
|
||||
@@ -2,7 +2,6 @@ import {useRef, useState, useEffect} from "react";
|
||||
import PinIcon from "../components/icons/PinIcon";
|
||||
import CalendarIcon from "../components/icons/CalendarIcon";
|
||||
import PhoneIcon from "../components/icons/PhoneIcon";
|
||||
import HeartIcon from "../components/icons/HeartIcon";
|
||||
import TrashIcon from "../components/icons/TrashIcon";
|
||||
import {useContactSeller} from "../hooks/useContactSeller";
|
||||
import {useAuthContext} from "../context/AuthContext";
|
||||
@@ -12,7 +11,7 @@ import RewardPopup from "../components/feed/RewardPopup";
|
||||
import Toast from "../components/Toast";
|
||||
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 [showCalendar, setShowCalendar] = useState(false);
|
||||
const [showReward, setShowReward] = useState(false);
|
||||
@@ -89,15 +88,18 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on
|
||||
{!compact && (
|
||||
<div className="f-card-actions">
|
||||
<div className="f-card-actions-left">
|
||||
<button type="button"
|
||||
className={`f-card-icon-btn${liked ? " liked" : ""}`}
|
||||
{address && (
|
||||
<div
|
||||
className="f-meta-pill f-loc-pill"
|
||||
title={t('postCard.showOnMap', { address })}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
onLike(ad.id);
|
||||
}}>
|
||||
<HeartIcon filled={liked}/>
|
||||
</button>
|
||||
<span className="f-card-like-count">{(ad.likeCount || 0) + likeCountAdj}</span>
|
||||
onLocationClick?.(ad);
|
||||
}}
|
||||
>
|
||||
<PinIcon/> {address}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="f-card-actions-right">
|
||||
{onEdit && isOwner && !isClosed && (
|
||||
@@ -153,18 +155,6 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on
|
||||
|
||||
{!compact && (
|
||||
<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 && (
|
||||
<>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user