diff --git a/src/app/components/PlanetaryInteraction/PlanetCard.tsx b/src/app/components/PlanetaryInteraction/PlanetCard.tsx index 8c916e8..dee8753 100644 --- a/src/app/components/PlanetaryInteraction/PlanetCard.tsx +++ b/src/app/components/PlanetaryInteraction/PlanetCard.tsx @@ -102,9 +102,11 @@ export const PlanetCard = ({ return ( + extractors.length > 0 ? ( + + ) : null } componentsProps={{ tooltip: { diff --git a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx index 783ef6d..8b55101 100644 --- a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx +++ b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx @@ -165,11 +165,8 @@ export const PlanetTableRow = ({ } }} onClick={(e) => { - // Only trigger if clicking a cell with the clickable-cell class if (!(e.target as HTMLElement).closest('.clickable-cell')) return; - if (extractors.length > 0) { - setSimulationOpen(!simulationOpen); - } + setSimulationOpen(!simulationOpen); }} > @@ -190,17 +187,19 @@ export const PlanetTableRow = ({ e.extractor_details?.product_type_id && e.extractor_details?.qty_per_cycle) - .map(e => ({ - typeId: e.extractor_details!.product_type_id!, - baseValue: e.extractor_details!.qty_per_cycle!, - cycleTime: e.extractor_details!.cycle_time || 3600, - installTime: e.install_time ?? "", - expiryTime: e.expiry_time ?? "" - }))} - /> + extractors.length > 0 ? ( + e.extractor_details?.product_type_id && e.extractor_details?.qty_per_cycle) + .map(e => ({ + typeId: e.extractor_details!.product_type_id!, + baseValue: e.extractor_details!.qty_per_cycle!, + cycleTime: e.extractor_details!.cycle_time || 3600, + installTime: e.install_time ?? "", + expiryTime: e.expiry_time ?? "" + }))} + /> + ) : null } componentsProps={{ tooltip: {