Overview
Gupshup's platform enables businesses to connect with their customers through various channels, often leveraging location-based services for discovery and engagement. In this problem, you will build a core component for a 'Local Business Finder' application. This component will display various business locations on an interactive map, allowing users to discover and view details of nearby establishments.
What you need to do / Task
Your task is to develop a React component that displays a list of businesses alongside an interactive map. The application should allow users to:
- Display Businesses: Render a list of predefined businesses and corresponding markers on a map.
- Filter by Category: Implement a category filter that dynamically updates both the business list and the map markers based on the selected category.
- Interactive Selection: When a business marker on the map is clicked, or a business item in the list is clicked, its details should be displayed in a dedicated panel. The selected business's marker on the map and its entry in the list should be visually highlighted.
- Map Centering: The map should automatically center on the selected business's location when it's chosen.
UI/UX expectations
- The application should have a clear layout, ideally with the map occupying a significant portion of the screen, and a sidebar for the business list and details.
- Markers on the map should be visually distinct, with the selected business's marker having a different appearance (e.g., color).
- The business list should be scrollable if there are many entries.
- The category filter should be intuitive (e.g., a dropdown).
- Business details should be clearly presented in a dedicated panel.
Acceptance criteria
- All mock businesses are initially displayed on the map as markers and in the business list.
- Selecting a category from the filter correctly updates both the visible markers on the map and the business list.
- Clicking on a business marker on the map displays its details in the detail panel and highlights the corresponding item in the business list.
- Clicking on a business item in the list displays its details in the detail panel and highlights its corresponding marker on the map.
- The map view automatically adjusts to center on the selected business's marker.
- The selected business's marker uses a distinct icon/color (e.g., red) compared to unselected markers (default blue).