Skip to content

Commit

Permalink
Merge pull request #171 from ucdavis/srk/capital-cost-inputs
Browse files Browse the repository at this point in the history
update way app handles inputs and capital cost outputs
  • Loading branch information
kaiyanl authored Nov 18, 2021
2 parents be115d7 + 23956ef commit 0a35177
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>FRREDSS</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Map/MapContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export const MapContainer = () => {
};

setAllYearResults(allYearResults);
setTeaInputs(allYearResults.teaInputs);
setTeaInputs({ ...teaInputs });
setSelectedYearIndex(years.length);

// combine input values with default bounds for a the sensitivity analysis
Expand Down
2 changes: 1 addition & 1 deletion src/components/Results/ResultsExport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const ResultsExport = (props: Props) => {
);
const treatmentName = Treatments[treatmentIndex].name;

const capitalCost = formatCurrency(props.teaInputs.CapitalCost);
const capitalCost = formatCurrency(props.allYearResults.teaInputs.CapitalCost);

const makeExcel = async () => {
// https://github.com/exceljs/exceljs#interface
Expand Down
2 changes: 1 addition & 1 deletion src/components/Results/ResultsTables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ResultsTable = (props: Props) => {
</tr>
<tr>
<td>Capital Cost ($)</td>
<td>{formatCurrency(props.teaInputs.CapitalCost)}</td>
<td>{formatCurrency(props.allYearResults.teaInputs.CapitalCost)}</td>
</tr>
<tr>
<td>Net Electrical Capacity (kWe)</td>
Expand Down

0 comments on commit 0a35177

Please sign in to comment.