added all feeds for admin
This commit is contained in:
@@ -11,7 +11,7 @@ import RewardPopup from "../components/feed/RewardPopup";
|
||||
import Toast from "../components/Toast";
|
||||
import {useTranslation} from 'react-i18next';
|
||||
|
||||
export default function PostOnFeed({ ad, onEdit, onDelete, onMarkFound, isOwner, onImageClick, onLocationClick, onAuthRequired, compact }) {
|
||||
export default function PostOnFeed({ ad, onEdit, onDelete, onMarkFound, onReopen, isOwner, authorLabel, allowEditClosed, onImageClick, onLocationClick, onAuthRequired, compact }) {
|
||||
const { t } = useTranslation();
|
||||
const [showCalendar, setShowCalendar] = useState(false);
|
||||
const [showReward, setShowReward] = useState(false);
|
||||
@@ -69,6 +69,9 @@ export default function PostOnFeed({ ad, onEdit, onDelete, onMarkFound, isOwner,
|
||||
>
|
||||
{ad.title}
|
||||
</div>
|
||||
{authorLabel && (
|
||||
<div className="f-card-author-sub">{authorLabel}</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="f-card-head-side">
|
||||
{typeBadge}
|
||||
@@ -102,7 +105,7 @@ export default function PostOnFeed({ ad, onEdit, onDelete, onMarkFound, isOwner,
|
||||
)}
|
||||
</div>
|
||||
<div className="f-card-actions-right">
|
||||
{onEdit && isOwner && !isClosed && (
|
||||
{onEdit && isOwner && (!isClosed || allowEditClosed) && (
|
||||
<button type="button" className="f-card-edit-btn"
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
@@ -207,6 +210,17 @@ export default function PostOnFeed({ ad, onEdit, onDelete, onMarkFound, isOwner,
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
{onReopen && isOwner && isClosed && (
|
||||
<div className="f-card-found-wrap">
|
||||
<button type="button" className="f-card-found-btn f-card-reopen-btn"
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
onReopen(ad.id);
|
||||
}}>
|
||||
{t('postCard.reopen')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{contactError && (
|
||||
<Toast
|
||||
|
||||
Reference in New Issue
Block a user