Skip to content

Commit

Permalink
Move MyMenuView components
Browse files Browse the repository at this point in the history
  • Loading branch information
dtun committed Aug 14, 2024
1 parent d174799 commit 4abbf23
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions components/MyMenuView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ export function MyMenuView({ menuData }: { menuData: MenuItem[] }) {
contentContainerStyle={styles.listContent}
data={menuData}
ItemSeparatorComponent={ItemSeparator}
ListFooterComponent={ListFooterComponent}
ListHeaderComponent={ListHeaderComponent}
ListFooterComponent={<View style={styles.footer} />}
ListHeaderComponent={
<View style={styles.header}>
<Text style={styles.headerTitle}>My Music</Text>
<Link href="/edit">
<Text>Edit</Text>
</Link>
</View>
}
renderItem={({ item }) => (
<MyMenuViewItem item={item} menuData={menuData} />
)}
Expand All @@ -23,21 +30,6 @@ export function MyMenuView({ menuData }: { menuData: MenuItem[] }) {
);
}

function ListHeaderComponent() {
return (
<View style={styles.header}>
<Text style={styles.headerTitle}>My Music</Text>
<Link href="/edit">
<Text>Edit</Text>
</Link>
</View>
);
}

function ListFooterComponent() {
return <View style={styles.footer}></View>;
}

let styles = StyleSheet.create({
header: {
alignItems: "center",
Expand Down

0 comments on commit 4abbf23

Please sign in to comment.