'use client' import { useState, useEffect, useCallback } from 'react' import { api, ApiRequestError } from '@/lib/api' import type { Place } from '@/types' type FilterTab = 'pending_moderation' | 'published' | 'rejected' | 'revision' | 'deleted' const FILTERS: { key: FilterTab; label: string }[] = [ { key: 'pending_moderation', label: 'Новые' }, { key: 'published', label: 'Одобренные недавно' }, { key: 'rejected', label: 'Отклонённые' }, { key: 'revision', label: 'На доработке' }, { key: 'deleted', label: 'Удалённые' }, ] function ReworkModal({ place, onClose, onConfirm }: { place: Place; onClose: () => void; onConfirm: (id: string, comment: string) => void }) { const [comment, setComment] = useState('') return (
{place.title}
{actionMsg}
)}Загрузка...
) : places.length === 0 ? (Нет мест
) : ({place.address}
} {place.description &&{place.description}
}Комментарий модератора: {place.moderation_comment}
)}{hardDeletePlace.title}
Место и все его файлы будут безвозвратно удалены.