Country Flag
Renders the flag emoji for the currently active market's country and updates automatically when the market changes.
What it does
Country Flag renders the flag emoji for the currently active market's country. It reads from the shared market store and automatically updates whenever the active market changes, ensuring the displayed flag always reflects the current selection.
If no market is currently active, the component displays a configurable fallback emoji instead.
How to set it up
Place APCountryFlag next to components such as APMarketSelector or AP_ActiveMarket so users can clearly see which market is active. The component requires no configuration beyond optional styling and fallback customization.
- Add AP_CountryFlag to your layout near your market selection UI.
- Optionally adjust the font size to control the visual size of the flag emoji.
- Optionally set a custom fallback emoji to show when no market is selected.
The component will automatically subscribe to the market store and re-render when the active market changes.