|
|
@@ -103,31 +103,32 @@ export default function AdminModerationPage() {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <div>
|
|
|
- <h1 className="mb-6 text-2xl font-bold text-white">Модерация</h1>
|
|
|
-
|
|
|
- {actionMsg && (
|
|
|
- <p className="mb-4 rounded-lg bg-green-500/10 px-4 py-2 text-sm text-green-400">{actionMsg}</p>
|
|
|
- )}
|
|
|
-
|
|
|
- <div className="mb-6 flex flex-wrap gap-2">
|
|
|
- {FILTERS.map((f) => (
|
|
|
- <button key={f.key} onClick={() => { setFilter(f.key); setActionMsg('') }}
|
|
|
- className={`rounded-lg px-4 py-2 text-sm transition ${
|
|
|
- filter === f.key ? 'bg-green-600 text-white' : 'bg-white/10 text-white/60 hover:bg-white/20'
|
|
|
- }`}
|
|
|
- >
|
|
|
- {f.label}
|
|
|
- </button>
|
|
|
- ))}
|
|
|
- </div>
|
|
|
+ <div className="min-h-screen pt-20">
|
|
|
+ <div className="mx-auto max-w-3xl px-4">
|
|
|
+ <h1 className="mb-6 text-2xl font-bold text-white">Модерация</h1>
|
|
|
+
|
|
|
+ {actionMsg && (
|
|
|
+ <p className="mb-4 rounded-lg bg-green-500/10 px-4 py-2 text-sm text-green-400">{actionMsg}</p>
|
|
|
+ )}
|
|
|
+
|
|
|
+ <div className="mb-6 flex flex-wrap gap-2">
|
|
|
+ {FILTERS.map((f) => (
|
|
|
+ <button key={f.key} onClick={() => { setFilter(f.key); setActionMsg('') }}
|
|
|
+ className={`rounded-lg px-4 py-2 text-sm transition ${
|
|
|
+ filter === f.key ? 'bg-green-600 text-white' : 'bg-white/10 text-white/60 hover:bg-white/20'
|
|
|
+ }`}
|
|
|
+ >
|
|
|
+ {f.label}
|
|
|
+ </button>
|
|
|
+ ))}
|
|
|
+ </div>
|
|
|
|
|
|
- {loading ? (
|
|
|
- <p className="text-white/60">Загрузка...</p>
|
|
|
- ) : places.length === 0 ? (
|
|
|
- <p className="text-white/40">Нет мест</p>
|
|
|
- ) : (
|
|
|
- <div className="space-y-4">
|
|
|
+ {loading ? (
|
|
|
+ <p className="text-white/60">Загрузка...</p>
|
|
|
+ ) : places.length === 0 ? (
|
|
|
+ <p className="text-white/40">Нет мест</p>
|
|
|
+ ) : (
|
|
|
+ <div className="max-h-[calc(100vh-15rem)] space-y-4 overflow-y-auto pb-8 pr-1">
|
|
|
{places.map((place) => (
|
|
|
<div key={place.id} className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
|
<div className="mb-2 flex items-center gap-3">
|
|
|
@@ -192,6 +193,8 @@ export default function AdminModerationPage() {
|
|
|
</div>
|
|
|
)}
|
|
|
|
|
|
+ </div>
|
|
|
+
|
|
|
{reworkPlace && (
|
|
|
<ReworkModal
|
|
|
place={reworkPlace}
|