22 lines
438 B
TypeScript
22 lines
438 B
TypeScript
import {
|
|
countryFlagUrl,
|
|
countryCrestUrl,
|
|
countryLogoUrl,
|
|
getBuiltinCountry,
|
|
hasCountryCrest,
|
|
} from '../data/builtinCountries';
|
|
|
|
export {
|
|
countryFlagUrl,
|
|
countryCrestUrl,
|
|
countryLogoUrl,
|
|
getBuiltinCountry,
|
|
hasCountryCrest,
|
|
};
|
|
|
|
export function suggestTeamFlagUrl(code?: string): string {
|
|
const c = getBuiltinCountry(code);
|
|
if (!c) return '';
|
|
return hasCountryCrest(c) ? countryCrestUrl(c) : countryFlagUrl(c);
|
|
}
|