import React from 'react'; import { useRegion } from '../contexts/RegionContext'; export const RegionSwitcher: React.FC = () => { const { currentRegion, setRegion, availableRegions } = useRegion(); // If only one region is available (e.g. Regional Admin or Normal User), show text only or hide logic // Actually, distinct visual indication is good. if (availableRegions.length <= 1) { return (
Região: {currentRegion === 'SP' ? 'São Paulo' : currentRegion === 'MG' ? 'Minas Gerais' : currentRegion}
); } return (
Região:
); };