Skip to content

Commit

Permalink
FIx places header
Browse files Browse the repository at this point in the history
  • Loading branch information
tortuvshin committed Mar 22, 2024
1 parent 27ba5be commit a32c198
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 41 deletions.
14 changes: 6 additions & 8 deletions src/features/Account/screens/EditProfileScreen.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, TextInput, ActivityIndicator, KeyboardAvoidingView, Pressable, Keyboard } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { EventRegister } from 'react-native-event-listeners';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { useCustomer, useLocale } from 'hooks';
import { getLocation } from 'utils/Geo';
import { set } from 'utils/Storage';
import { logError, translate, splitCountryCode } from 'utils';
import React, { useState } from 'react';
import { ActivityIndicator, Keyboard, KeyboardAvoidingView, Pressable, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import tailwind from 'tailwind';
import PhoneInput from 'ui/PhoneInput';
import { logError, splitCountryCode, translate } from 'utils';
import { getLocation } from 'utils/Geo';

const EditProfileScreen = ({ navigation }) => {
const insets = useSafeAreaInsets();
Expand Down
21 changes: 10 additions & 11 deletions src/features/Account/screens/SavedPlacesScreen.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, FlatList, ActivityIndicator } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { EventRegister } from 'react-native-event-listeners';
import { Collection, Place } from '@fleetbase/sdk';
import { faArrowLeft, faEdit, faMapMarked, faPlus, faStar, faTimes } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faTimes, faMapMarked, faPlus, faEdit, faStar, faArrowLeft } from '@fortawesome/free-solid-svg-icons';
import { Customer } from '@fleetbase/storefront';
import { Place, Collection, isResource } from '@fleetbase/sdk';
import { useStorefront, useCustomer, useDeliveryLocation, useLocale } from 'hooks';
import { mutatePlaces, translate } from 'utils';
import { useCustomer, useDeliveryLocation, useLocale, useStorefront } from 'hooks';
import useFleetbase, { adapter as FleetbaseAdapter } from 'hooks/use-fleetbase';
import { useResourceStorage, useResourceCollection, get, set } from 'utils/Storage';
import React, { useEffect, useState } from 'react';
import { ActivityIndicator, FlatList, Text, TouchableOpacity, View } from 'react-native';
import { EventRegister } from 'react-native-event-listeners';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import tailwind from 'tailwind';
import { mutatePlaces, translate } from 'utils';
import { useResourceCollection } from 'utils/Storage';

const { emit, addEventListener, removeEventListener } = EventRegister;

Expand Down Expand Up @@ -66,7 +65,7 @@ const SavedPlacesScreen = ({ navigation, route }) => {
}, []);

return (
<View style={[tailwind('w-full h-full bg-white'), { paddingTop: insets.top }]}>
<View style={[tailwind('w-full h-full bg-white')]}>
<FlatList
data={places}
onRefresh={loadPlaces}
Expand Down
14 changes: 7 additions & 7 deletions src/features/Auth/screens/CreateAccountScreen.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { useCustomer, useLocale, useStorefront } from 'hooks';
import React, { useState } from 'react';
import { SafeAreaView, View, Text, TextInput, ImageBackground, TouchableOpacity, ActivityIndicator, Platform, KeyboardAvoidingView, Pressable, Keyboard } from 'react-native';
import { ActivityIndicator, ImageBackground, Keyboard, KeyboardAvoidingView, Platform, Pressable, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { useStorefront, useLocale, useCustomer } from 'hooks';
import { getLocation } from 'utils/Geo';
import { get } from 'utils/Storage';
import { translate, config } from 'utils';
import tailwind from 'tailwind';
import PhoneInput from 'ui/PhoneInput';
import { config, translate } from 'utils';
import { getLocation } from 'utils/Geo';
import { get } from 'utils/Storage';

const CreateAccountScreen = ({ navigation, route }) => {
const { info, redirectTo } = route.params;
Expand Down
19 changes: 9 additions & 10 deletions src/features/Browser/screens/CategoryScreen.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useState, useEffect } from 'react';
import { SafeAreaView, ScrollView, View, TouchableOpacity, Text, Image, ActivityIndicator } from 'react-native';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { Category } from '@fleetbase/storefront';
import { faArrowLeft, faFolder } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { useLocale, useMountedState } from 'hooks';
import useStorefront, { adapter as StorefrontAdapter } from 'hooks/use-storefront';
import { useMountedState, useLocale } from 'hooks';
import { formatCurrency, logError, config, translate, isLastIndex } from 'utils';
import { useResourceCollection } from 'utils/Storage';
import Storefront, { Category } from '@fleetbase/storefront';
import ProductCard from 'ui/ProductCard';
import React, { useEffect, useState } from 'react';
import { ActivityIndicator, SafeAreaView, ScrollView, Text, TouchableOpacity, View } from 'react-native';
import tailwind from 'tailwind';
import ProductCard from 'ui/ProductCard';
import { isLastIndex, logError, translate } from 'utils';
import { useResourceCollection } from 'utils/Storage';

const CategoryScreen = ({ navigation, route }) => {
const { attributes } = route.params;
Expand Down Expand Up @@ -62,8 +62,7 @@ const CategoryScreen = ({ navigation, route }) => {
<TouchableOpacity
key={category.id}
onPress={() => transitionToCategory(category)}
style={[tailwind(`w-full flex flex-row items-center py-3 px-2 ${isLastIndex(subCategories, index) ? '' : 'border-b border-gray-100'}`)]}
>
style={[tailwind(`w-full flex flex-row items-center py-3 px-2 ${isLastIndex(subCategories, index) ? '' : 'border-b border-gray-100'}`)]}>
<View style={[tailwind('flex flex-row items-center justify-center mr-3')]}>
<View style={[tailwind('rounded-full flex items-center justify-center w-8 h-8 bg-blue-50')]}>
<FontAwesomeIcon icon={faFolder} size={17} style={[tailwind('text-blue-900')]} />
Expand Down
10 changes: 5 additions & 5 deletions src/features/Browser/screens/HomeScreen.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState, useEffect } from 'react';
import { ScrollView, View, Text, ImageBackground, TouchableOpacity } from 'react-native';
import { useStorefront, useLocale } from 'hooks';
import { translate } from 'utils';
import { useLocale, useStorefront } from 'hooks';
import React, { useEffect, useState } from 'react';
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
import tailwind from 'tailwind';
import CategoryProductSlider from 'ui/CategoryProductSlider';
import StorefrontHeader from 'ui/headers/StorefrontHeader';
import tailwind from 'tailwind';
import { translate } from 'utils';

const HomeScreen = ({ navigation, route }) => {
const { info } = route.params;
Expand Down

0 comments on commit a32c198

Please sign in to comment.