diff --git a/.env b/.env
index 4a145d0..58455fe 100644
--- a/.env
+++ b/.env
@@ -1 +1 @@
-API_URL=http://141.105.64.233:7723/api/v1
\ No newline at end of file
+API_URL=https://api.cpcargo.uz/api/v1
\ No newline at end of file
diff --git a/src/api/URL.ts b/src/api/URL.ts
index f2c5c02..707dd03 100644
--- a/src/api/URL.ts
+++ b/src/api/URL.ts
@@ -1,4 +1,4 @@
-export const BASE_URL = 'http://141.105.64.233:7723/api/v1';
+export const BASE_URL = 'https://api.cpcargo.uz/api/v1';
export const REGISTER = '/mobile/auth/register';
export const LOGIN = '/mobile/auth/login';
diff --git a/src/api/axios.ts b/src/api/axios.ts
index 38a9834..60c9f9e 100644
--- a/src/api/axios.ts
+++ b/src/api/axios.ts
@@ -3,7 +3,7 @@ import axios, { AxiosError } from 'axios';
import { navigate } from 'components/NavigationRef';
const axiosInstance = axios.create({
- baseURL: 'http://141.105.64.233:7723/api/v1',
+ baseURL: 'https://api.cpcargo.uz/api/v1',
timeout: 10000,
headers: {
'Content-Type': 'application/json',
diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx
index 8036398..be3c1a9 100644
--- a/src/components/Navigation.tsx
+++ b/src/components/Navigation.tsx
@@ -94,13 +94,13 @@ const styles = StyleSheet.create({
wrapper: {
bottom: 0,
width: '100%',
- height: 60,
+ height: 70,
},
container: {
height: '100%',
backgroundColor: '#fff',
- borderTopLeftRadius: 30,
- borderTopRightRadius: 30,
+ borderTopLeftRadius: 20,
+ borderTopRightRadius: 20,
flexDirection: 'row',
shadowColor: '#000',
shadowOpacity: 0.1,
diff --git a/src/screens/home/home/ui/Tabs.tsx b/src/screens/home/home/ui/Tabs.tsx
index 22428ef..7418e7b 100644
--- a/src/screens/home/home/ui/Tabs.tsx
+++ b/src/screens/home/home/ui/Tabs.tsx
@@ -1,12 +1,6 @@
-import { Dispatch, SetStateAction, useCallback, useMemo } from 'react';
+import { Dispatch, SetStateAction, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
-import {
- FlatList,
- Image,
- Text,
- TouchableOpacity,
- useWindowDimensions,
-} from 'react-native';
+import { Image, Text, TouchableOpacity, View } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import AviaLogo from 'screens/../../assets/bootsplash/Avia.png';
import AutoLogo from 'screens/../../assets/bootsplash/auto.png';
@@ -19,8 +13,6 @@ interface Props {
const Tabs = ({ activeTab, setActiveTab }: Props) => {
const { t } = useTranslation();
- const { width: screenWidth } = useWindowDimensions();
- const cardWidth = screenWidth * 0.95;
const styles = useMemo(() => HomeStyle(), []);
const gradientStyle = useMemo(
@@ -29,9 +21,7 @@ const Tabs = ({ activeTab, setActiveTab }: Props) => {
borderRadius: 8,
flexDirection: 'row' as const,
alignItems: 'center' as const,
- paddingHorizontal: 12,
height: 80,
- gap: 8,
}),
[],
);
@@ -53,57 +43,55 @@ const Tabs = ({ activeTab, setActiveTab }: Props) => {
[t],
);
- const renderItem = useCallback(
- ({ item }: { item: (typeof tabsData)[number] }) => {
- const isActive = activeTab === item.type;
- const gradientColors = isActive
- ? ['#28A7E8', '#28A7E8']
- : ['#28a8e82d', '#28A7E8'];
-
- return (
- setActiveTab(item.type)}
- style={{ flex: 1 }}
- >
-
-
-
- {item.label}
-
-
-
- );
- },
- [activeTab, styles, gradientStyle, setActiveTab],
- );
-
return (
- idx.toString()}
- renderItem={renderItem}
- showsHorizontalScrollIndicator={false}
- scrollEnabled={false}
- columnWrapperStyle={{
- gap: 8,
- }}
- contentContainerStyle={{
- paddingHorizontal: (screenWidth - cardWidth) / 2,
- }}
- getItemLayout={(_, index) => ({
- length: cardWidth,
- offset: cardWidth * index,
- index,
+
+ {tabsData.map(item => {
+ const isActive = activeTab === item.type;
+ const gradientColors = isActive
+ ? ['#28A7E8', '#28A7E8']
+ : ['#28a8e82d', '#28A7E8'];
+
+ return (
+ setActiveTab(item.type)}
+ style={{ flex: 1 }}
+ >
+
+
+
+ {item.label}
+
+
+
+ );
})}
- />
+
+ // idx.toString()}
+ // renderItem={renderItem}
+ // showsHorizontalScrollIndicator={false}
+ // scrollEnabled={false}
+ // columnWrapperStyle={{
+ // gap: 8,
+ // }}
+ // contentContainerStyle={{
+ // paddingHorizontal: (screenWidth - cardWidth) / 2,
+ // }}
+ // getItemLayout={(_, index) => ({
+ // length: cardWidth,
+ // offset: cardWidth * index,
+ // index,
+ // })}
+ // />
);
};