added map on post
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user