test push

This commit is contained in:
jze9
2026-05-18 18:51:00 +05:00
parent a64d8469df
commit 5057a61d55
5 changed files with 271 additions and 177 deletions

View File

@@ -12,7 +12,10 @@ export function MediaModal({ type, token, onSelect, onClose }) {
useEffect(() => {
api.listMedia(token, type)
.then(data => { setAllItems(data); setItems(data); setLoading(false) })
.then(data => {
const list = Array.isArray(data) ? data : (data.items ?? [])
setAllItems(list); setItems(list); setLoading(false)
})
.catch(() => setLoading(false))
}, [])