@@ -87,26 +87,6 @@ export default function HomeScreen() {
8787 description: ' Lorem ipsum dolor sit amet' ,
8888 }));
8989 const title = ' Animated Title' ;
90- const backgroundImageUrl =
91- ' https://images.unsplash.com/photo-1579546929518-9e396f3cc809' ;
92- const avatarUrl = ' https://api.dicebear.com/7.x/avataaars/png?seed=John' ;
93-
94- const HeaderBackground = () => (
95- <ImageBackground
96- source = { { uri: backgroundImageUrl }}
97- style = { styles .headerBackground }
98- />
99- );
100-
101- const HeaderContent = () => (
102- <View style = { styles .headerContent } >
103- <Image source = { { uri: avatarUrl }} style = { styles .avatar } />
104- </View >
105- );
106-
107- const StickyComponent = () => (
108- <Text style = { styles .stickyComponent } >Sticky Item</Text >
109- );
11090
11191 const renderItem = ({
11292 item ,
@@ -134,6 +114,32 @@ export default function HomeScreen() {
134114 );
135115}
136116
117+ const HeaderBackground = () => {
118+ const backgroundImageUrl =
119+ ' https://images.unsplash.com/photo-1579546929518-9e396f3cc809' ;
120+
121+ return (
122+ <ImageBackground
123+ source = { { uri: backgroundImageUrl }}
124+ style = { styles .headerBackground }
125+ />
126+ );
127+ };
128+
129+ const HeaderContent = () => {
130+ const avatarUrl = ' https://api.dicebear.com/7.x/avataaars/png?seed=John' ;
131+
132+ return (
133+ <View style = { styles .headerContent } >
134+ <Image source = { { uri: avatarUrl }} style = { styles .avatar } />
135+ </View >
136+ );
137+ };
138+
139+ const StickyComponent = () => (
140+ <Text style = { styles .stickyComponent } >Sticky Item</Text >
141+ );
142+
137143const styles = StyleSheet .create ({
138144 headerBackground: {
139145 backgroundColor: ' white' ,
0 commit comments