Skip to content

Commit 28f9b8b

Browse files
committed
Tabs navigation
1 parent b25cdf6 commit 28f9b8b

File tree

2 files changed

+25
-46
lines changed

2 files changed

+25
-46
lines changed

apps/mobile/src/app/(auth)/_layout.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import { DynamicColorIOS, Platform } from "react-native";
33

44
export default function AuthTabLayout() {
55
// Dynamic colors for liquid glass effect on iOS
6-
const dynamicTextColor = Platform.select({
7-
ios: DynamicColorIOS({
8-
dark: "white",
9-
light: "black",
10-
}),
11-
default: "white",
12-
});
6+
const dynamicTextColor =
7+
Platform.OS === "ios"
8+
? DynamicColorIOS({
9+
dark: "white",
10+
light: "black",
11+
})
12+
: "white";
1313

14-
const dynamicTintColor = Platform.select({
15-
ios: DynamicColorIOS({
16-
dark: "#f97316", // orange-500
17-
light: "#ea580c", // orange-600
18-
}),
19-
default: "#f97316",
20-
});
14+
const dynamicTintColor =
15+
Platform.OS === "ios"
16+
? DynamicColorIOS({
17+
dark: "#f97316", // orange-500
18+
light: "#ea580c", // orange-600
19+
})
20+
: "#f97316";
2121

2222
return (
2323
<NativeTabs
@@ -36,15 +36,6 @@ export default function AuthTabLayout() {
3636
/>
3737
</NativeTabs.Trigger>
3838

39-
{/* Chat - New Chat Tab with + icon */}
40-
<NativeTabs.Trigger name="chat">
41-
<Label>Chat</Label>
42-
<Icon
43-
sf={{ default: "plus.circle", selected: "plus.circle.fill" }}
44-
drawable="ic_menu_add"
45-
/>
46-
</NativeTabs.Trigger>
47-
4839
{/* Settings/Profile Tab */}
4940
<NativeTabs.Trigger name="settings">
5041
<Label>Profile</Label>
@@ -53,6 +44,15 @@ export default function AuthTabLayout() {
5344
drawable="ic_menu_preferences"
5445
/>
5546
</NativeTabs.Trigger>
47+
48+
{/* Chat - Separate floating button (iOS search role style) */}
49+
<NativeTabs.Trigger name="chat" role="search">
50+
<Label hidden />
51+
<Icon
52+
sf={{ default: "plus", selected: "plus" }}
53+
drawable="ic_menu_add"
54+
/>
55+
</NativeTabs.Trigger>
5656
</NativeTabs>
5757
);
5858
}

apps/mobile/src/app/(auth)/index.tsx

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { Link } from "expo-router";
2-
import { ScrollView, Text, TouchableOpacity, View } from "react-native";
1+
import { ScrollView, Text, View } from "react-native";
32
import { useAuthStore } from "../../stores/authStore";
43

54
export default function TasksScreen() {
6-
const { cloudRegion, projectId, logout } = useAuthStore();
5+
const { cloudRegion, projectId } = useAuthStore();
76

87
return (
98
<ScrollView className="flex-1 bg-dark-bg">
@@ -32,30 +31,10 @@ export default function TasksScreen() {
3231
</View>
3332
</View>
3433

35-
{/* Chat Links */}
36-
<Link href="/(auth)/agent" className="mb-3 rounded-xl bg-blue-600 p-4">
37-
<Text className="text-center font-medium text-white">
38-
Array Agent
39-
</Text>
40-
</Link>
41-
<Link href="/chat" className="mb-6 rounded-xl bg-dark-surface p-4">
42-
<Text className="text-center font-medium text-white">
43-
PostHog AI (Max)
44-
</Text>
45-
</Link>
46-
4734
{/* Empty State */}
4835
<View className="flex-1 items-center justify-center py-20">
4936
<Text className="text-base text-dark-text-muted">No tasks yet</Text>
5037
</View>
51-
52-
{/* Sign Out */}
53-
<TouchableOpacity
54-
onPress={logout}
55-
className="mb-6 rounded-xl bg-dark-surface p-4"
56-
>
57-
<Text className="text-center font-medium text-red-500">Sign out</Text>
58-
</TouchableOpacity>
5938
</View>
6039
</ScrollView>
6140
);

0 commit comments

Comments
 (0)