diff --git a/components/Header.tsx b/components/Header.tsx index 025ff7c1..4ed71a40 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -133,7 +133,6 @@ function Header() { const googleAnalyticsId = theme.settings?.googleAnalyticsId; - console.log('navlinks', navLinks); return (
diff --git a/components/paths/InventoryNodeSummary.tsx b/components/paths/InventoryNodeSummary.tsx index 7b46c165..1b3acd64 100644 --- a/components/paths/InventoryNodeSummary.tsx +++ b/components/paths/InventoryNodeSummary.tsx @@ -69,6 +69,7 @@ type PathsBasicNodeContentProps = { node: CausalGridNodeFragment; onLoaded: (id: string, impact: number) => void; displayGoals: InstanceGoalEntry[]; + refetching: boolean; }; type EmissionDisplay = { @@ -86,7 +87,7 @@ type Emissions = { }; const InventoryNodeSummary = (props: PathsBasicNodeContentProps) => { - const { categoryId, node, onLoaded, displayGoals } = props; + const { categoryId, node, onLoaded, displayGoals, refetching } = props; const yearRange = useReactiveVar(yearRangeVar); const format = useFormatter(); @@ -197,7 +198,7 @@ const InventoryNodeSummary = (props: PathsBasicNodeContentProps) => { onLoaded(categoryId, 100); // using exhausive deps here causes an infinite loop // eslint-disable-next-line react-hooks/exhaustive-deps - }, [yearRange[1]]); + }, [yearRange[1], refetching]); return ( <> diff --git a/components/paths/PathsNodeSummary.tsx b/components/paths/PathsNodeSummary.tsx index 9cf60950..23267e78 100644 --- a/components/paths/PathsNodeSummary.tsx +++ b/components/paths/PathsNodeSummary.tsx @@ -101,6 +101,7 @@ const PathsNodeSummary = React.memo((props: PathsNodeContentProps) => { node={data.node} onLoaded={onLoaded ? onLoaded : () => void 0} displayGoals={displayGoals} + refetching={refetching} /> ); } diff --git a/components/paths/toolbar/CompleteSettings.tsx b/components/paths/toolbar/CompleteSettings.tsx index 96ecc526..95f054ec 100644 --- a/components/paths/toolbar/CompleteSettings.tsx +++ b/components/paths/toolbar/CompleteSettings.tsx @@ -167,11 +167,6 @@ const CompleteSettings = (props) => {
{t('change-scenario')}
- -
{t('actions')}
- {/**/} - (coming soon) -
{hasGlobalParameters && ( <> diff --git a/components/paths/toolbar/GoalOutcomeBar.tsx b/components/paths/toolbar/GoalOutcomeBar.tsx index 568230a8..5c64449a 100644 --- a/components/paths/toolbar/GoalOutcomeBar.tsx +++ b/components/paths/toolbar/GoalOutcomeBar.tsx @@ -190,7 +190,7 @@ const outcomeAsText = ( ) => { if (isForecast) return t.markup('outcome-bar-summary-forecast', { - scenarioName: 'sfsdfsd', + scenarioName: scenarioName, goalType: goalType, selectedYear: selectedYear, selectedYearValue: selectedYearValue, diff --git a/utils/paths/PathsActionNode.ts b/utils/paths/PathsActionNode.ts index 743c4fb0..a104e5f6 100644 --- a/utils/paths/PathsActionNode.ts +++ b/utils/paths/PathsActionNode.ts @@ -29,6 +29,8 @@ export default class PathsActionNode { getUnit(): string | null | undefined { return ( + this.data.metricDim?.unit?.htmlShort || + this.data.metricDim?.unit?.short || this.data.unit?.htmlShort || this.data.unit?.htmlLong || this.data.unit?.short ||