Skip to content

Commit

Permalink
[Upd #504] Refactored for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope authored and blcham committed Oct 8, 2024
1 parent 4bcc018 commit 92a1be4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const FaultEventMenu = ({ selectedShapeToolData, outOfSync = null, onEventUpdate
const [failureModeOverview, setFailureModeOverview] = useState<FailureMode | null>(null);

const [criticality, setCriticality] = useState<number | undefined>(0);
const [predictedFailureRate, setPredictedFailureRate] = useState<number | undefined>(0);
const [ataSystem, setAtaSystem] = useState<string | undefined>("");
const [partNumber, setPartNumber] = useState<string | undefined>("");
const [stock, setStock] = useState<string | undefined>("");
Expand Down Expand Up @@ -198,9 +197,9 @@ const FaultEventMenu = ({ selectedShapeToolData, outOfSync = null, onEventUpdate
const filteredFailureRate = types.filter((type) => type.hasFailureRate);

if (filteredFailureRate.length === 1 && filteredFailureRate[0].hasFailureRate?.prediction?.value) {
setPredictedFailureRate(filteredFailureRate[0].hasFailureRate?.prediction?.value);
setSnsPredictedFailureRate(filteredFailureRate[0].hasFailureRate?.prediction?.value);
} else {
setPredictedFailureRate(undefined);
setSnsPredictedFailureRate(undefined);
}

const superTypes = asArray(shapeToolData?.supertypes?.behavior?.item?.supertypes);
Expand Down

0 comments on commit 92a1be4

Please sign in to comment.