diff --git a/apps/mobile/app/(app)/(tabs)/_layout.tsx b/apps/mobile/app/(app)/(tabs)/_layout.tsx index a5cbb77a..db31e18c 100644 --- a/apps/mobile/app/(app)/(tabs)/_layout.tsx +++ b/apps/mobile/app/(app)/(tabs)/_layout.tsx @@ -1,7 +1,6 @@ -import { Tabs } from 'expo-router'; -import React from 'react'; +import { Tabs } from 'expo-router' -import { TabBarIcon } from '@/components/navigation/TabBarIcon'; +import { TabBarIcon } from '@/components/navigation/TabBarIcon' export default function TabLayout() { return ( @@ -9,13 +8,17 @@ export default function TabLayout() { screenOptions={{ // tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint, headerShown: false, - }}> + }} + > ( - + ), }} /> @@ -24,10 +27,13 @@ export default function TabLayout() { options={{ tabBarShowLabel: false, tabBarIcon: ({ color, focused }) => ( - + ), }} /> - ); + ) } diff --git a/apps/mobile/app/(app)/(tabs)/explore.tsx b/apps/mobile/app/(app)/(tabs)/explore.tsx index 54875a39..99144fdc 100644 --- a/apps/mobile/app/(app)/(tabs)/explore.tsx +++ b/apps/mobile/app/(app)/(tabs)/explore.tsx @@ -1,27 +1,26 @@ -import { Avatar, AvatarFallback, AvatarImage } from '@/components/Avatar'; -import { Button } from '@/components/Button'; -import { useAuth } from '@clerk/clerk-expo'; -import { ScrollView, Text, View } from 'react-native'; -import { getHonoClient } from '@/lib/client'; -import { useQuery } from '@tanstack/react-query'; +import { Avatar, AvatarFallback, AvatarImage } from '@/components/Avatar' +import { Button } from '@/components/Button' +import { getHonoClient } from '@/lib/client' +import { useAuth } from '@clerk/clerk-expo' +import { useQuery } from '@tanstack/react-query' +import { ScrollView, Text, View } from 'react-native' export default function TabTwoScreen() { - const { signOut } = useAuth(); + const { signOut } = useAuth() const { data } = useQuery({ queryKey: ['me'], queryFn: async () => { const hc = await getHonoClient() const res = await hc.v1.auth.me.$get() - if (res.ok) { - return await res.json() - } else { + if (!res.ok) { throw new Error(await res.text()) } + return await res.json() }, }) return ( - + SS - {data?.email ? `Logged as ${data.email}` : 'loading...'} + + {data?.email ? `Logged as ${data.email}` : 'loading...'} +