Skip to content

Commit

Permalink
Add ios chevron to single guest modal
Browse files Browse the repository at this point in the history
  • Loading branch information
ProchaLu committed Aug 7, 2024
1 parent 87cee5b commit 348eaa0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import {
useFonts,
} from '@expo-google-fonts/poppins';
import Constants from 'expo-constants';
import { Stack } from 'expo-router';
import { router, Stack } from 'expo-router';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, View } from 'react-native';
import { Platform, Pressable, StyleSheet, View } from 'react-native';
import { TabBarIcon } from '../components/TabBarIcon';
import { colors } from '../constants/colors';

const styles = StyleSheet.create({
Expand All @@ -23,6 +24,19 @@ const styles = StyleSheet.create({
},
});

function BackButton() {
return (
<Pressable
style={{
padding: 10,
}}
onPress={() => router.back()}
>
<TabBarIcon name="chevron-down" color={colors.text} />
</Pressable>
);
}

export default function HomeLayout() {
const [loaded] = useFonts({
Poppins_700Bold,
Expand All @@ -46,6 +60,7 @@ export default function HomeLayout() {
title: '',
animation: 'slide_from_bottom',
headerTintColor: colors.text,
headerRight: Platform.OS === 'ios' ? BackButton : undefined,
headerStyle: {
backgroundColor: colors.background,
},
Expand Down

0 comments on commit 348eaa0

Please sign in to comment.