2025-04-29 13:17:00 +00:00
|
|
|
import { Tabs } from "expo-router";
|
|
|
|
import React from "react";
|
|
|
|
import { Platform, AppRegistry } from "react-native";
|
2025-04-28 12:36:08 +00:00
|
|
|
|
2025-04-29 13:17:00 +00:00
|
|
|
import { HapticTab } from "@/components/HapticTab";
|
|
|
|
import { IconSymbol } from "@/components/ui/IconSymbol";
|
|
|
|
import TabBarBackground from "@/components/ui/TabBarBackground";
|
|
|
|
import { Colors } from "@/constants/Colors";
|
|
|
|
import { useColorScheme } from "@/hooks/useColorScheme";
|
|
|
|
|
|
|
|
AppRegistry.registerHeadlessTask("GeolocationBackgroundTask", () =>
|
|
|
|
require("../../task/watchPosition")
|
|
|
|
);
|
2025-04-28 12:36:08 +00:00
|
|
|
|
|
|
|
export default function TabLayout() {
|
2025-04-29 13:17:00 +00:00
|
|
|
const colorScheme = useColorScheme();
|
2025-04-28 12:36:08 +00:00
|
|
|
|
2025-04-29 13:17:00 +00:00
|
|
|
return (
|
|
|
|
<Tabs
|
|
|
|
screenOptions={{
|
|
|
|
tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
|
|
|
|
headerShown: false,
|
|
|
|
tabBarButton: HapticTab,
|
|
|
|
tabBarBackground: TabBarBackground,
|
|
|
|
tabBarStyle: Platform.select({
|
|
|
|
ios: {
|
|
|
|
// Use a transparent background on iOS to show the blur effect
|
|
|
|
position: "absolute",
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
}),
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Tabs.Screen
|
|
|
|
name="index"
|
|
|
|
options={{
|
|
|
|
title: "Home",
|
|
|
|
tabBarIcon: ({ color }) => (
|
|
|
|
<IconSymbol size={28} name="house.fill" color={color} />
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Tabs.Screen
|
|
|
|
name="explore"
|
|
|
|
options={{
|
|
|
|
title: "Explore",
|
|
|
|
tabBarIcon: ({ color }) => (
|
|
|
|
<IconSymbol
|
|
|
|
size={28}
|
|
|
|
name="paperplane.fill"
|
|
|
|
color={color}
|
|
|
|
/>
|
|
|
|
),
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Tabs>
|
|
|
|
);
|
2025-04-28 12:36:08 +00:00
|
|
|
}
|