New: insights screen - #431
Conversation
|
sheabunge
left a comment
There was a problem hiding this comment.
Looks good! I want to hold off merging this until 3.10 is out of the beta branches, but I reckon this should be good for 4.0 if you're keen to get it out ASAP.
| const [chartViews, setChartViews] = useState<InsightsChartViews>( | ||
| () => window.CODE_SNIPPETS?.insightsChartViews ?? DEFAULT_INSIGHTS_CHART_VIEWS | ||
| ) | ||
| const chartViewsRef = useRef(chartViews) |
There was a problem hiding this comment.
Use useState instead of useRef for persisting data.
| * @return array<string, string> | ||
| */ | ||
| private function get_location_labels(): array { | ||
| return [ |
There was a problem hiding this comment.
Might be worth just returning the label and offloading translation to the front-end, where we are already including these strings. Otherwise, updating or amending this list now has two places where it needs to be changed.
No description provided.