Skip to content

Commit 65f2356

Browse files
acerto de margens e safearea da dashboard
1 parent f7ae83f commit 65f2356

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/mobile/app/(tabs)/_layout.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ export default function TabsLayout() {
3333
tabBarActiveTintColor: '#7C3AED',
3434
tabBarInactiveTintColor: '#9CA3AF',
3535
tabBarStyle: {
36-
backgroundColor: '#ffffff',
37-
borderTopWidth: 1,
38-
borderTopColor: '#E5E7EB',
39-
height: 60,
40-
paddingBottom: 8,
41-
paddingTop: 4,
36+
backgroundColor: '#ffffff',
37+
borderTopWidth: 1,
38+
borderTopColor: '#E5E7EB',
39+
paddingBottom: 8,
40+
paddingTop: 4,
4241
},
4342
tabBarLabelStyle: {
4443
fontSize: 11,

src/mobile/app/(tabs)/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import api from '@services/api';
1414
import { CLIENTES, EMPRESTIMOS, REPORT } from '@constants/endpoints';
1515
import { Emprestimo, fmt } from '../../types/emprestimo';
1616
import { StatusBar } from 'expo-status-bar';
17+
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
1718

1819
interface 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 }: {
224226
const 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

Comments
 (0)