Fix: ArchivModal kalkulator3d API response format
This commit is contained in:
@@ -509,7 +509,8 @@ function ArchivModal({ calcId, onClose }) {
|
|||||||
const mobile = window.innerWidth < 768;
|
const mobile = window.innerWidth < 768;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
api('/tools/kalkulator3d').then(items => {
|
api('/tools/kalkulator3d').then(d => {
|
||||||
|
const items = d.own || d || [];
|
||||||
setItem(items.find(i => i.id === calcId) || null);
|
setItem(items.find(i => i.id === calcId) || null);
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}, [calcId]);
|
}, [calcId]);
|
||||||
|
|||||||
Reference in New Issue
Block a user