Skip to content

Commit

Permalink
fix type errors - make showBoundaryNames default to false
Browse files Browse the repository at this point in the history
  • Loading branch information
Moggach committed Dec 18, 2024
1 parent 1368257 commit cbaac73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ const ReportConfigLegacyControls: React.FC = () => {
</div>
<div className="text-labelLg text-meepGray-200 flex items-center gap-2">
<Switch
checked={showBoundaryNames}
onCheckedChange={(showBoundaryNames: boolean) => {
checked={showBoundaryNames ?? false}
onCheckedChange={(checked: boolean) => {
updateReport({
displayOptions: { display: { showBoundaryNames } },
displayOptions: { display: { showBoundaryNames: checked } },
})
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion nextjs/src/app/reports/[id]/reportContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ReportConfig {
showLastElectionData?: boolean
showPostcodeLabels?: boolean
boundaryOutlines?: AnalyticalAreaType[]
showBoundaryNames?: false
showBoundaryNames?: boolean
}
}

Expand All @@ -49,6 +49,7 @@ export const defaultReportConfig: ReportConfig = {
showMPs: false,
showLastElectionData: false,
boundaryOutlines: [AnalyticalAreaType.ParliamentaryConstituency_2024],
showBoundaryNames: false,
},
}

Expand Down

0 comments on commit cbaac73

Please sign in to comment.