@@ -14,6 +14,7 @@ import api from '@services/api';
1414import { CLIENTES , EMPRESTIMOS , REPORT } from '@constants/endpoints' ;
1515import { Emprestimo , fmt } from '../../types/emprestimo' ;
1616import { StatusBar } from 'expo-status-bar' ;
17+ import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs' ;
1718
1819interface Stats {
1920 clientes : number ;
@@ -53,6 +54,7 @@ export default function DashboardScreen() {
5354 const [ stats , setStats ] = useState < Stats | null > ( null ) ;
5455 const [ vencendo , setVencendo ] = useState < Emprestimo [ ] > ( [ ] ) ;
5556 const [ carregando , setCarregando ] = useState ( true ) ;
57+ const tabBarHeight = useBottomTabBarHeight ( ) ;
5658
5759 useEffect ( ( ) => {
5860 async function carregar ( ) {
@@ -117,9 +119,9 @@ export default function DashboardScreen() {
117119} , [ user ] ) ;
118120
119121 return (
120- < SafeAreaView style = { s . safe } >
122+ < SafeAreaView style = { s . safe } edges = { [ 'top' , 'left' , 'right' ] } >
121123 < StatusBar style = "dark" />
122- < ScrollView style = { s . page } contentContainerStyle = { s . content } showsVerticalScrollIndicator = { false } >
124+ < ScrollView style = { s . page } contentContainerStyle = { [ s . content , { paddingBottom : tabBarHeight + 20 } ] } showsVerticalScrollIndicator = { false } >
123125 < View style = { s . header } >
124126 < View >
125127 < Text style = { s . saudacao } > { saudacao ( ) } , { nome } 👋</ Text >
@@ -224,7 +226,8 @@ function FinCard({ label, valor, cor, carregando }: {
224226const s = StyleSheet . create ( {
225227 safe : { flex : 1 , backgroundColor : '#F5F3FF' } ,
226228 page : { flex : 1 } ,
227- content : { padding : 20 , paddingBottom : 40 } ,
229+ content : { padding : 20 , paddingBottom : 120 } ,
230+
228231 header : { flexDirection : 'row' , justifyContent : 'space-between' , alignItems : 'flex-start' , marginBottom : 20 } ,
229232 logoutBtn : { backgroundColor : '#FEE2E2' , paddingHorizontal : 14 , paddingVertical : 8 , borderRadius : 8 } ,
230233 logoutTxt : { color : '#DC2626' , fontWeight : '700' , fontSize : 13 } ,
0 commit comments