added map on post

This commit is contained in:
SlimusMinus
2026-08-24 01:26:06 +03:00
parent e13e80101b
commit 8326866393
5 changed files with 50 additions and 33 deletions

View File

@@ -11,7 +11,7 @@ import DateCalendarPopup from "../components/DateCalendarPopup";
import Toast from "../components/Toast";
import {useTranslation} from 'react-i18next';
export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, onDelete, onMarkFound, isOwner, onImageClick, onAuthRequired }) {
export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, onDelete, onMarkFound, isOwner, onImageClick, onLocationClick, onAuthRequired }) {
const { t } = useTranslation();
const [showCalendar, setShowCalendar] = useState(false);
const [descExpanded, setDescExpanded] = useState(false);
@@ -131,7 +131,18 @@ export default function PostOnFeed({ ad, liked, likeCountAdj, onLike, onEdit, on
</div>
<div className="f-card-meta">
{address && <div className="f-meta-pill"><PinIcon/> {address}</div>}
{address && (
<div
className="f-meta-pill f-loc-pill"
title={t('postCard.showOnMap', { address })}
onClick={e => {
e.stopPropagation();
onLocationClick?.(ad);
}}
>
<PinIcon/> {address}
</div>
)}
{createdAt && (
<div
className="f-meta-pill f-date-pill"