show extraction tooltip only if we have extractors
This commit is contained in:
@@ -102,9 +102,11 @@ export const PlanetCard = ({
|
||||
return (
|
||||
<Tooltip
|
||||
title={
|
||||
extractors.length > 0 ? (
|
||||
<ExtractionSimulationTooltip
|
||||
extractors={extractors}
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
componentsProps={{
|
||||
tooltip: {
|
||||
|
@@ -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);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<TableCell component="th" scope="row" className="clickable-cell">
|
||||
@@ -190,6 +187,7 @@ export const PlanetTableRow = ({
|
||||
<Tooltip
|
||||
placement="right"
|
||||
title={
|
||||
extractors.length > 0 ? (
|
||||
<ExtractionSimulationTooltip
|
||||
extractors={extractors
|
||||
.filter(e => e.extractor_details?.product_type_id && e.extractor_details?.qty_per_cycle)
|
||||
@@ -201,6 +199,7 @@ export const PlanetTableRow = ({
|
||||
expiryTime: e.expiry_time ?? ""
|
||||
}))}
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
componentsProps={{
|
||||
tooltip: {
|
||||
|
Reference in New Issue
Block a user