Skip to content

Add click-to-filter by country on WorldMap - #456

Open
smehmood wants to merge 2 commits into
masterfrom
smehmood/niteshift-4psl4e
Open

Add click-to-filter by country on WorldMap#456
smehmood wants to merge 2 commits into
masterfrom
smehmood/niteshift-4psl4e

Conversation

@smehmood

@smehmood smehmood commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Clicking a country on the world map now filters the dashboard down to that country's data, matching the existing click-to-filter behavior of the Country metrics table.

Changes

  • WorldMap.tsx: added an onClick handler that navigates with country=eq.<code> via useNavigation, and a pointer cursor on countries to signal they're clickable. Antarctica and geographies without an ISO code are ignored.

Verification

Clicked the United States on the map — the page applied a "Country Is United States" filter chip and all metrics updated to the US-only totals (4.42k visitors).

Screenshots

🌒 Run on Niteshift: View Task

🤖 Generated with Claude Code


Open in Devin Review

Clicking a country on the world map now applies a country=eq.XX filter,
matching the filter behavior of the country metrics table. Adds a pointer
cursor to indicate countries are clickable.

Run-on: Niteshift
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mesa-dot-dev

mesa-dot-dev Bot commented Jul 22, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread src/components/metrics/WorldMap.tsx Outdated
Antarctica (AQ) is skipped by handleClick, so it should not display a
clickable cursor. Match the cursor guard to the click guard.

Run-on: Niteshift
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant