Fixed layouts

This commit is contained in:
2026-04-21 17:51:33 +02:00
parent c751e28fce
commit 99ed8bae59
4 changed files with 78 additions and 36 deletions

View File

@@ -42,7 +42,7 @@ export function BirthdayList() {
const groupedData = groupBirthdaysByDate(DATA);
return (
<View>
<View style={styles.container}>
<View style={styles.titleContainer}>
<Text style={{ fontSize: 24, fontWeight: "bold" }}>
Upcoming Birthdays
@@ -61,6 +61,8 @@ export function BirthdayList() {
renderItem={({ item }) => (
<BirthdayItem name={item.name} date={item.date} />
)}
style={styles.list}
contentContainerStyle={styles.listContent}
showsVerticalScrollIndicator={false}
renderSectionHeader={({ section: { title } }) => (
<View style={styles.headerContainer}>
@@ -96,13 +98,23 @@ function groupBirthdaysByDate(data: BirthdayItemData[]): SectionData[] {
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
titleContainer: {
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
gap: 12,
paddingHorizontal: 5,
paddingVertical: 10,
},
list: {
flex: 1,
},
listContent: {
paddingBottom: 20,
},
addButton: {
width: 40,
height: 40,