|
@@ -26,7 +26,8 @@ export const FilterModal: FC<ModalProps> = ({
|
|
|
isModalVisible,
|
|
|
setModalVisible,
|
|
|
countriesData,
|
|
|
- applyFilter
|
|
|
+ applyFilter,
|
|
|
+ isCountryHidden
|
|
|
}) => {
|
|
|
const netInfo = useConnection();
|
|
|
const [filterAge, setFilterAge] = useState<filterAgeType>(null);
|
|
@@ -35,8 +36,8 @@ export const FilterModal: FC<ModalProps> = ({
|
|
|
|
|
|
return (
|
|
|
<Modal isVisible={isModalVisible}>
|
|
|
- <View style={{ height: 270, backgroundColor: 'white', borderRadius: 15 }}>
|
|
|
- <View style={{ marginLeft: '5%', marginRight: '5%', marginTop: '5%' }}>
|
|
|
+ <View style={{ backgroundColor: 'white', borderRadius: 15 }}>
|
|
|
+ <View style={{ marginLeft: '5%', marginRight: '5%', marginTop: '5%', marginBottom: '10%' }}>
|
|
|
<View style={{ alignSelf: 'flex-end' }}>
|
|
|
<TouchableOpacity onPress={() => setModalVisible(!isModalVisible)}>
|
|
|
<CloseIcon />
|
|
@@ -44,27 +45,30 @@ export const FilterModal: FC<ModalProps> = ({
|
|
|
</View>
|
|
|
<View style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
<Text style={{ color: Colors.DARK_BLUE, fontSize: 20, fontWeight: '700' }}>Filter</Text>
|
|
|
- <Dropdown
|
|
|
- style={[ModalStyles.dropdown, { width: '100%', marginTop: 20 }]}
|
|
|
- placeholderStyle={ModalStyles.placeholderStyle}
|
|
|
- selectedTextStyle={ModalStyles.selectedTextStyle}
|
|
|
- containerStyle={ModalStyles.dropdownContent}
|
|
|
- data={countriesData}
|
|
|
- disable={!netInfo?.isInternetReachable}
|
|
|
- labelField="name"
|
|
|
- valueField="two"
|
|
|
- value={filterCountry?.two}
|
|
|
- placeholder="Country"
|
|
|
- onChange={(item) => {
|
|
|
- setFilterCountry(item);
|
|
|
- }}
|
|
|
- search={true}
|
|
|
- searchPlaceholder="Search"
|
|
|
- autoScroll={false}
|
|
|
- inputSearchStyle={ModalStyles.search}
|
|
|
- flatListProps={{ initialNumToRender: 50, maxToRenderPerBatch: 10 }}
|
|
|
- />
|
|
|
- <View style={ModalStyles.ageAndRankingWrapper}>
|
|
|
+ {!isCountryHidden && (
|
|
|
+ <Dropdown
|
|
|
+ style={[ModalStyles.dropdown, { width: '100%', marginTop: 20 }]}
|
|
|
+ placeholderStyle={ModalStyles.placeholderStyle}
|
|
|
+ selectedTextStyle={ModalStyles.selectedTextStyle}
|
|
|
+ containerStyle={ModalStyles.dropdownContent}
|
|
|
+ data={countriesData}
|
|
|
+ disable={!netInfo?.isInternetReachable}
|
|
|
+ labelField="name"
|
|
|
+ valueField="two"
|
|
|
+ value={filterCountry?.two}
|
|
|
+ placeholder="Country"
|
|
|
+ onChange={(item) => {
|
|
|
+ setFilterCountry(item);
|
|
|
+ }}
|
|
|
+ search={true}
|
|
|
+ searchPlaceholder="Search"
|
|
|
+ autoScroll={false}
|
|
|
+ inputSearchStyle={ModalStyles.search}
|
|
|
+ flatListProps={{ initialNumToRender: 50, maxToRenderPerBatch: 10 }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+
|
|
|
+ <View style={[ModalStyles.ageAndRankingWrapper, isCountryHidden ? {marginTop: 20} : {}]}>
|
|
|
<Dropdown
|
|
|
style={ModalStyles.dropdown}
|
|
|
placeholderStyle={ModalStyles.placeholderStyle}
|