Skip to content

Commit

Permalink
🐛 fix: Safe Area Implement
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrogomes18 committed Jan 15, 2025
1 parent 384ae4e commit 648759e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ import React from 'react';
import PrivateRoutes from './AppStack/private.routes';
import PublicRoutes from './AppStack/public.routes';
import useAuth from '@hooks/useAuth';
import { NavigationContainer } from '@react-navigation/native';
import { InputVendedor } from '../screens/MyTeam/styles';
import { SafeAreaView, StyleSheet, Platform } from 'react-native';



const Routes: React.FC = () => {
const { user } = useAuth();

return (<>
return (<SafeAreaView style={styles.droidSafeArea}>
{user?.id ? (
<PrivateRoutes user={user} />
) : (
<PublicRoutes />
)}
</>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
droidSafeArea: {
flex: 1,
backgroundColor: 'transparent',
paddingTop: Platform.OS === 'ios' ? 16 : 0,
},
});

export default Routes;

0 comments on commit 648759e

Please sign in to comment.