import React from "react"; import "./ItemModal.css"; import { getServerUrl } from "../../../../config/api"; const ItemModal = ({ item, onClose, onEquip, onUnequip, isEquipped, getStatIcon, formatStatName, }) => { if (!item) return null; const CONNECT_URL = getServerUrl(); const ASSET_BASE_URL = `${CONNECT_URL}/static/`; const getFullTextureUrl = (path) => { if (!path) return "/assets/no-image.png"; if (path.startsWith("http")) return path; return `${ASSET_BASE_URL}${path}`; }; return (
e.stopPropagation()} >
{item.displayName}

{item.displayName || item.name}

{item.rarity?.toUpperCase()} SYSTEM_ID: {item.id}

{item.description}

Technical Specs

{item.stats && Object.entries(item.stats).map(([statName, value]) => (
{" "} {formatStatName ? formatStatName(statName) : statName.toUpperCase()} +{value}
))}
{isEquipped ? ( ) : ( item.canEquip && ( ) )}
); }; export default ItemModal;