* docs(react-native): create the basic expo project * docs(react-native): cross-platform Apple social sign-in * docs(react-native): cross-platform Google social sign-in * docs(react-native): fix typos * docs(react-native): remove wrong entry in the `Connection` component * Correct typos * Prettier * Draft * Draft * docs(react-native): use kebab-case file naming convention in Expo guide - use kebab-case file naming convention in Expo guide - add trailing semicolon to align with the standard Expo template conventions * docs(react-native): use kebab-case file naming convention in Expo social auth example * docs(react-native): update the packages of the Expo social auth example * Fix * Draft * Changes * Correct log message --------- Co-authored-by: Chris Chinchilla <chris.ward@supabase.io> Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import { Tabs } from 'expo-router';
|
|
import React from 'react';
|
|
import { Platform } from 'react-native';
|
|
|
|
import { HapticTab } from '@/components/haptic-tab';
|
|
import { IconSymbol } from '@/components/ui/icon-symbol';
|
|
import TabBarBackground from '@/components/ui/tab-bar-background';
|
|
import { Colors } from '@/constants/colors';
|
|
import { useColorScheme } from '@/hooks/use-color-scheme';
|
|
|
|
export default function TabLayout() {
|
|
const colorScheme = useColorScheme();
|
|
|
|
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>
|
|
);
|
|
}
|