Skip to content

Commit

Permalink
refactor: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
pbullhove committed Apr 4, 2024
1 parent 095c93e commit c1960d7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web/src/Components/Bridging/BridgeContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default ({ bridges, mode, setMode, bridgeValue, setValue }: BridgeContain
const [bridgeValueHelperText, setBridgeValueHelperText] = useState(undefined)
const [bridgeValueVariant, setBridgeValueVariant] = useState(undefined)
const [optimalBridgeGraphData, setOptimalBridgeGraphData] = useState([])
const [graphData, setGraphData] = useState([])
const [cumulativeGraphData, setCumulativeGraphData] = useState([])
const [volumeData, setVolumeData] = useState([])
const [cumulativeVolumeData, setCumulativeVolumeData] = useState([])
const { token } = useContext(AuthContext)

// Load size fractions once on first render
Expand Down Expand Up @@ -89,8 +89,8 @@ export default ({ bridges, mode, setMode, bridgeValue, setValue }: BridgeContain
useEffect(() => {
const cumulative = findGraphData(sizeFractions, bridges)
const differentiated = differentiateArrayObjects(cumulative)
setCumulativeGraphData(cumulative)
setGraphData(differentiated)
setCumulativeVolumeData(cumulative)
setVolumeData(differentiated)
}, [sizeFractions, bridges])

return (
Expand All @@ -116,12 +116,12 @@ export default ({ bridges, mode, setMode, bridgeValue, setValue }: BridgeContain
bridgeValueHelperText={bridgeValueHelperText}
/>
<BridgeGraph
graphData={cumulativeGraphData}
graphData={cumulativeVolumeData}
yAxis={'Cumulative Volume (%)'}
sizeFractions={sizeFractions}
bridges={bridges}
/>
<BridgeGraph graphData={graphData} yAxis={'Volume (%)'} sizeFractions={sizeFractions} bridges={bridges} />
<BridgeGraph graphData={volumeData} yAxis={'Volume (%)'} sizeFractions={sizeFractions} bridges={bridges} />
</div>
</div>
)
Expand Down

0 comments on commit c1960d7

Please sign in to comment.