complated
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Logo from '@/assets/images/logo.png';
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { RefreshProvider } from '@/components/ui/RefreshContext';
|
||||
import { useHomeStore } from '@/screens/home/lib/hook';
|
||||
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
||||
import { router, Tabs } from 'expo-router';
|
||||
import { Home, Megaphone, PlusCircle, User } from 'lucide-react-native';
|
||||
@@ -12,6 +13,7 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
export default function TabsLayout() {
|
||||
const { isDark } = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const { setShowFilter, setStep } = useHomeStore();
|
||||
const rotateAnim = useRef(new Animated.Value(0)).current;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -58,9 +60,9 @@ export default function TabsLayout() {
|
||||
paddingBottom: 12,
|
||||
borderTopLeftRadius: 24,
|
||||
borderTopRightRadius: 24,
|
||||
backgroundColor: isDark ? 'rgba(15, 23, 42, 0.95)' : 'rgba(255, 255, 255, 0.95)', // #0f172a mos fon
|
||||
backgroundColor: isDark ? 'rgba(15, 23, 42, 1)' : 'rgba(255, 255, 255, 1)', // #0f172a mos fon
|
||||
borderWidth: 0.5,
|
||||
borderColor: isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(226, 232, 240, 0.8)', // quyuq fon uchun yengil oq
|
||||
borderColor: isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(226, 232, 240, 1)', // quyuq fon uchun yengil oq
|
||||
...Platform.select({
|
||||
ios: {
|
||||
shadowColor: isDark ? '#0f172a' : '#0f172a', // shadow qora emas #0f172a bilan uyg‘un
|
||||
@@ -85,6 +87,7 @@ export default function TabsLayout() {
|
||||
>
|
||||
<Tabs.Screen
|
||||
name="index"
|
||||
key={"index"}
|
||||
options={{
|
||||
title: 'Bosh sahifa',
|
||||
tabBarLabel: ({ color, focused }) => (
|
||||
@@ -103,7 +106,12 @@ export default function TabsLayout() {
|
||||
</Text>
|
||||
),
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
<View
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
router.push('/(dashboard)');
|
||||
setShowFilter(false);
|
||||
setStep('filter');
|
||||
}}
|
||||
style={[
|
||||
styles.iconContainer,
|
||||
focused && styles.iconContainerActive,
|
||||
@@ -113,7 +121,7 @@ export default function TabsLayout() {
|
||||
]}
|
||||
>
|
||||
<Home color={color} size={30} strokeWidth={2} />
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
@@ -135,7 +143,7 @@ export default function TabsLayout() {
|
||||
},
|
||||
]}
|
||||
>
|
||||
{t("Qo'shish")}
|
||||
{t("Jo'natish")}
|
||||
</Text>
|
||||
),
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
|
||||
Reference in New Issue
Block a user