MOVING COUNTRIES: (#1229)

* wip

* move colors

* sort the dev screen menu alphabetically. for sanity

* lint

* move country hooks to sdk

* added peer dep

* add as dev dep

* remove SelfMobileSdk component before someone thinks that it should be used

* mock it like before
This commit is contained in:
Aaron DeRuvo
2025-10-07 15:05:33 +02:00
committed by GitHub
parent 9cc5d909ad
commit f7c5ef0e74
26 changed files with 535 additions and 296 deletions

View File

@@ -2,11 +2,12 @@
// SPDX-License-Identifier: BUSL-1.1
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
import getCountryISO2 from 'country-iso-3-to-2';
import React from 'react';
import { View } from 'react-native';
import * as CountryFlags from 'react-native-svg-circle-country-flags';
import { alpha3ToAlpha2 } from '@selfxyz/common/constants/countries';
import { slate300 } from '@/utils/colors';
type CountryFlagComponent = React.ComponentType<{
@@ -41,7 +42,7 @@ const findFlagComponent = (formattedCode: string) => {
const getCountryFlag = (countryCode: string): CountryFlagComponent | null => {
try {
const normalizedCountryCode = countryCode === 'D<<' ? 'DEU' : countryCode;
const iso2 = getCountryISO2(normalizedCountryCode);
const iso2 = alpha3ToAlpha2(normalizedCountryCode);
if (!iso2) {
return null;
}