From 1254db39637ea900ff2518338a2b475195f011aa Mon Sep 17 00:00:00 2001 From: MaksSlyzar Date: Sat, 18 Apr 2026 18:42:50 +0300 Subject: [PATCH] Fixed datapack overflow --- .../views/GameInterface/tabs/DatapackTab.jsx | 156 +++++++++--------- 1 file changed, 79 insertions(+), 77 deletions(-) diff --git a/client/src/views/GameInterface/tabs/DatapackTab.jsx b/client/src/views/GameInterface/tabs/DatapackTab.jsx index 6dda336..ee0aa5f 100644 --- a/client/src/views/GameInterface/tabs/DatapackTab.jsx +++ b/client/src/views/GameInterface/tabs/DatapackTab.jsx @@ -58,90 +58,92 @@ const DatapackTab = () => { return (
-
-
- {sections.map((s) => ( - - ))} + +
+
+ {sections.map((s) => ( + + ))} +
+ +
+ + setSearchQuery(e.target.value)} + /> +
-
- - setSearchQuery(e.target.value)} - /> -
-
- - -
- {displayList.map((item) => ( -
- setSelectedItem({ ...item, sectionType: activeSection }) - } - > -
- {item.texture ? ( - - ) : ( -
- {item.displayName?.[0] || "?"} -
- )} -
- -
- {item.displayName} - {item.id} - - {/* Секція луту без картинок, лише текст або іконка коробки */} - {activeSection === "hostiles" && - item.loot && - item.loot.length > 0 && ( -
- {item.loot.map((lootEntry, idx) => { - const lootData = GameDataManager.getItem(lootEntry.id); - return ( -
- - - {lootData?.displayName || - lootEntry.id.split(":").pop()} - -
- ); - })} +
+
+ {displayList.map((item) => ( +
+ setSelectedItem({ ...item, sectionType: activeSection }) + } + > +
+ {item.texture ? ( + + ) : ( +
+ {item.displayName?.[0] || "?"}
)} +
+ +
+ {item.displayName} + {item.id} + + {activeSection === "hostiles" && + item.loot && + item.loot.length > 0 && ( +
+ {item.loot.map((lootEntry, idx) => { + const lootData = GameDataManager.getItem( + lootEntry.id, + ); + return ( +
+ + + {lootData?.displayName || + lootEntry.id.split(":").pop()} + +
+ ); + })} +
+ )} +
-
- ))} + ))} +
- {selectedItem && (