mirror of
https://github.com/selfxyz/self.git
synced 2026-01-08 22:28:11 -05:00
SELF-1554 : Fix Country Picker (#1492)
* country picker is always euclid. * track when users press the info icon
This commit is contained in:
@@ -77,16 +77,12 @@ const documentsScreens = {
|
||||
},
|
||||
CountryPicker: {
|
||||
screen: CountryPickerScreen,
|
||||
options: IS_EUCLID_ENABLED
|
||||
? ({
|
||||
header: HeadlessNavForEuclid,
|
||||
statusBarHidden: CountryPickerScreen.statusBar?.hidden,
|
||||
statusBarStyle: CountryPickerScreen.statusBar?.style,
|
||||
headerShown: true,
|
||||
} as NativeStackNavigationOptions)
|
||||
: {
|
||||
headerShown: false,
|
||||
},
|
||||
options: {
|
||||
header: HeadlessNavForEuclid,
|
||||
statusBarHidden: CountryPickerScreen.statusBar?.hidden,
|
||||
statusBarStyle: CountryPickerScreen.statusBar?.style,
|
||||
headerShown: true,
|
||||
} as NativeStackNavigationOptions,
|
||||
},
|
||||
IDPicker: {
|
||||
screen: IDPickerScreen,
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
* Use this constant instead of checking __DEV__ directly throughout the codebase.
|
||||
*/
|
||||
export const IS_DEV_MODE = typeof __DEV__ !== 'undefined' && __DEV__;
|
||||
export const IS_EUCLID_ENABLED = IS_DEV_MODE; // just in case we forgot to turn it off before pushing to prod.
|
||||
export const IS_EUCLID_ENABLED = false; //IS_DEV_MODE; // just in case we forgot to turn it off before pushing to prod.
|
||||
|
||||
@@ -79,6 +79,7 @@ export const BackupEvents = {
|
||||
};
|
||||
|
||||
export const DocumentEvents = {
|
||||
COUNTRY_HELP_TAPPED: 'Document: Country Help Tapped',
|
||||
ADD_NEW_AADHAAR_SELECTED: 'Document: Add Aadhaar',
|
||||
ADD_NEW_MOCK_SELECTED: 'Document: Add New Document via Mock',
|
||||
ADD_NEW_SCAN_SELECTED: 'Document: Add New Document via Scan',
|
||||
|
||||
@@ -8,6 +8,7 @@ import { commonNames } from '@selfxyz/common/constants/countries';
|
||||
import { CountryPickerScreen as CountryPickerUI, type SafeArea } from '@selfxyz/euclid';
|
||||
|
||||
import { RoundFlag } from '../../components';
|
||||
import { DocumentEvents } from '../../constants/analytics';
|
||||
import { useSelfClient } from '../../context';
|
||||
import { useCountries } from '../../documents/useCountries';
|
||||
import { buttonTap } from '../../haptic';
|
||||
@@ -59,7 +60,6 @@ const CountryPickerScreen: React.FC<SafeArea> & { statusBar: typeof CountryPicke
|
||||
const onSearchChange = useCallback((value: string) => {
|
||||
setSearchValue(value);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<CountryPickerUI
|
||||
insets={insets}
|
||||
@@ -72,7 +72,7 @@ const CountryPickerScreen: React.FC<SafeArea> & { statusBar: typeof CountryPicke
|
||||
getCountryName={getCountryName}
|
||||
searchValue={searchValue}
|
||||
onClose={selfClient.goBack}
|
||||
onInfoPress={() => console.log('Info pressed TODO: Implement')}
|
||||
onInfoPress={() => selfClient.trackEvent(DocumentEvents.COUNTRY_HELP_TAPPED)}
|
||||
onSearchChange={onSearchChange}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user