Loading packages/shop-mobile-expo/src/screens/app/MerchantsSearch.screen.tsx +17 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ import React from 'react'; import { View, ActivityIndicator, StyleSheet, ScrollView } from 'react-native'; import { Button, TextInput, Title, Text } from 'react-native-paper'; import { useLazyQuery } from '@apollo/client'; import { useNavigation } from '@react-navigation/native'; // tslint:disable-next-line: no-implicit-dependencies no-submodule-imports import MaterialIcon from '@expo/vector-icons/MaterialCommunityIcons'; import { debounce } from 'lodash'; Loading Loading @@ -38,6 +39,9 @@ import { } from '../../assets/ts/styles'; function MerchantsSearch({}) { // NAVIGATION const NAVIGATION = useNavigation(); // SELECTORS const LANGUAGE = useAppSelector(getLanguage); const USER_DATA = useAppSelector(getUserData); Loading Loading @@ -106,6 +110,18 @@ function MerchantsSearch({}) { [], ); const onPressMerchant = (warehouseId: string) => { if (!isEmpty(warehouseId)) { const ROUTE_WAREHOUSE_ID = { warehouseId, }; NAVIGATION.navigate( 'DRAWER/IN_STORE' as never, ROUTE_WAREHOUSE_ID as never, ); } }; // EFFECTS React.useEffect(() => { debouncedFetchData(searchedValue); Loading Loading @@ -200,7 +216,7 @@ function MerchantsSearch({}) { indicatorIconProps={{ name: 'chevron-right' }} height={65} style={GS.mb2} onPress={() => {}} onPress={() => onPressMerchant(_item.id)} /> ))} </ScrollView> Loading packages/shop-mobile-expo/src/screens/app/Search.screen.tsx +20 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import { View, ActivityIndicator, StyleSheet, ScrollView } from 'react-native'; import { TextInput, Title, Text } from 'react-native-paper'; import { useLazyQuery } from '@apollo/client'; import { debounce } from 'lodash'; import { useNavigation } from '@react-navigation/native'; // TYPES/INTERFACES import type { Loading @@ -14,6 +15,9 @@ import type { ProductInfoInterface, } from '../../client/products/argumentInterfaces'; // HELPERS import { isEmpty } from '../../helpers/utils'; // STORE import { useAppSelector } from '../../store/hooks'; import { getUserData } from '../../store/features/user'; Loading @@ -39,6 +43,9 @@ import { } from '../../assets/ts/styles'; function SearchScreen({}) { // NAVIGATION const NAVIGATION = useNavigation(); // SELECTORS const LANGUAGE = useAppSelector(getLanguage); const USER_DATA = useAppSelector(getUserData); Loading Loading @@ -126,6 +133,18 @@ function SearchScreen({}) { [], ); const onPressMerchant = (warehouseId: string) => { if (!isEmpty(warehouseId)) { const ROUTE_WAREHOUSE_ID = { warehouseId, }; NAVIGATION.navigate( 'DRAWER/IN_STORE' as never, ROUTE_WAREHOUSE_ID as never, ); } }; // EFFECTS React.useEffect(() => { debouncedFetchData(searchedValue); Loading Loading @@ -217,7 +236,7 @@ function SearchScreen({}) { indicatorTextSize={CS.FONT_SIZE} height={65} style={GS.mb2} onPress={() => {}} onPress={() => onPressMerchant(_item?.id)} /> ))} </View> Loading Loading
packages/shop-mobile-expo/src/screens/app/MerchantsSearch.screen.tsx +17 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ import React from 'react'; import { View, ActivityIndicator, StyleSheet, ScrollView } from 'react-native'; import { Button, TextInput, Title, Text } from 'react-native-paper'; import { useLazyQuery } from '@apollo/client'; import { useNavigation } from '@react-navigation/native'; // tslint:disable-next-line: no-implicit-dependencies no-submodule-imports import MaterialIcon from '@expo/vector-icons/MaterialCommunityIcons'; import { debounce } from 'lodash'; Loading Loading @@ -38,6 +39,9 @@ import { } from '../../assets/ts/styles'; function MerchantsSearch({}) { // NAVIGATION const NAVIGATION = useNavigation(); // SELECTORS const LANGUAGE = useAppSelector(getLanguage); const USER_DATA = useAppSelector(getUserData); Loading Loading @@ -106,6 +110,18 @@ function MerchantsSearch({}) { [], ); const onPressMerchant = (warehouseId: string) => { if (!isEmpty(warehouseId)) { const ROUTE_WAREHOUSE_ID = { warehouseId, }; NAVIGATION.navigate( 'DRAWER/IN_STORE' as never, ROUTE_WAREHOUSE_ID as never, ); } }; // EFFECTS React.useEffect(() => { debouncedFetchData(searchedValue); Loading Loading @@ -200,7 +216,7 @@ function MerchantsSearch({}) { indicatorIconProps={{ name: 'chevron-right' }} height={65} style={GS.mb2} onPress={() => {}} onPress={() => onPressMerchant(_item.id)} /> ))} </ScrollView> Loading
packages/shop-mobile-expo/src/screens/app/Search.screen.tsx +20 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import { View, ActivityIndicator, StyleSheet, ScrollView } from 'react-native'; import { TextInput, Title, Text } from 'react-native-paper'; import { useLazyQuery } from '@apollo/client'; import { debounce } from 'lodash'; import { useNavigation } from '@react-navigation/native'; // TYPES/INTERFACES import type { Loading @@ -14,6 +15,9 @@ import type { ProductInfoInterface, } from '../../client/products/argumentInterfaces'; // HELPERS import { isEmpty } from '../../helpers/utils'; // STORE import { useAppSelector } from '../../store/hooks'; import { getUserData } from '../../store/features/user'; Loading @@ -39,6 +43,9 @@ import { } from '../../assets/ts/styles'; function SearchScreen({}) { // NAVIGATION const NAVIGATION = useNavigation(); // SELECTORS const LANGUAGE = useAppSelector(getLanguage); const USER_DATA = useAppSelector(getUserData); Loading Loading @@ -126,6 +133,18 @@ function SearchScreen({}) { [], ); const onPressMerchant = (warehouseId: string) => { if (!isEmpty(warehouseId)) { const ROUTE_WAREHOUSE_ID = { warehouseId, }; NAVIGATION.navigate( 'DRAWER/IN_STORE' as never, ROUTE_WAREHOUSE_ID as never, ); } }; // EFFECTS React.useEffect(() => { debouncedFetchData(searchedValue); Loading Loading @@ -217,7 +236,7 @@ function SearchScreen({}) { indicatorTextSize={CS.FONT_SIZE} height={65} style={GS.mb2} onPress={() => {}} onPress={() => onPressMerchant(_item?.id)} /> ))} </View> Loading