@@ -70,19 +70,95 @@ const HeaderComponent: React.FC<ScrollHeaderProps> = ({ showNavBar }) => {
7070 ) ;
7171} ;
7272
73- const LargeHeaderComponent = ( { scrollY } ) => (
74- < LargeHeader >
75- < ScalingView scrollY = { scrollY } >
76- < Text style = { { color : 'white' , fontSize : 14 } } > Welcome</ Text >
77- < Text style = { { color : 'white' , fontSize : 32 , fontWeight : 'bold' } } >
78- Twitter Profile Starter
79- </ Text >
80- < Text style = { { fontSize : 12 , fontWeight : 'normal' , color : '#8E8E93' } } >
81- Let's begin building the Twitter profile header!
73+ const LargeHeaderComponent : React . FC < ScrollLargeHeaderProps > = ( ) => {
74+ const { left, right } = useSafeAreaInsets ( ) ;
75+
76+ const onPressLink = useCallback ( async ( ) => {
77+ try {
78+ const supported = await Linking . canOpenURL ( 'https://codeherence.com' ) ;
79+
80+ if ( supported ) {
81+ await Linking . openURL ( 'https://codeherence.com' ) ;
82+ }
83+ } catch ( error ) {
84+ console . error ( error ) ;
85+ }
86+ } , [ ] ) ;
87+
88+ return (
89+ < LargeHeader headerStyle = { [ styles . largeHeaderStyle ] } >
90+ < View style = { styles . profileHandleContainer } >
91+ < View style = { styles . profileHeaderRow } >
92+ < Text style = { styles . title } > Evan Younan</ Text >
93+ < TwitterVerifiedSvg height = { 18 } width = { 18 } />
94+ </ View >
95+
96+ < Text style = { styles . disabledText } > @e_younan</ Text >
97+ </ View >
98+
99+ < Text style = { styles . text } >
100+ Founder of < Text style = { styles . primaryText } > @codeherence</ Text > • Helping companies develop
101+ and enhance their React Native apps
82102 </ Text >
83- </ ScalingView >
84- </ LargeHeader >
85- ) ;
103+
104+ < View style = { styles . dataRow } >
105+ < Feather name = "calendar" color = { DISABLED_COLOR } size = { 12 } />
106+ < Text style = { styles . disabledText } > Joined March 2023</ Text >
107+ </ View >
108+
109+ < View style = { styles . locationAndWebContainer } >
110+ < View style = { styles . dataRow } >
111+ < Feather name = "map-pin" color = { DISABLED_COLOR } size = { 12 } />
112+ < Text style = { styles . disabledText } > Toronto, Ontario</ Text >
113+ </ View >
114+
115+ < View style = { styles . dataRow } >
116+ < Feather name = "link" color = { DISABLED_COLOR } size = { 12 } />
117+ < Text onPress = { onPressLink } style = { styles . primaryText } >
118+ codeherence.com
119+ </ Text >
120+ </ View >
121+ </ View >
122+
123+ < View style = { styles . statsContainer } >
124+ < TouchableOpacity style = { styles . dataRow } >
125+ < Text style = { styles . mediumText } > 186</ Text >
126+ < Text style = { styles . disabledText } > Following</ Text >
127+ </ TouchableOpacity >
128+
129+ < TouchableOpacity style = { styles . dataRow } >
130+ < Text style = { styles . mediumText } > 132.8M</ Text >
131+ < Text style = { styles . disabledText } > Followers</ Text >
132+ </ TouchableOpacity >
133+ </ View >
134+
135+ < View style = { styles . whoFollowsThemContainer } >
136+ < View style = { styles . followerPreviewContainer } >
137+ { [ 4 , 5 , 2 ] . map ( ( num , index ) => {
138+ return (
139+ < Avatar
140+ key = { `avatar-${ num } ` }
141+ size = "sm"
142+ source = { { uri : `https://i.pravatar.cc/128?img=${ num } ` } }
143+ style = { {
144+ top : 0 ,
145+ zIndex : 3 - index ,
146+ position : index !== 0 ? 'absolute' : undefined ,
147+ left : ( AVATAR_SIZE_MAP . sm / 1.5 ) * index ,
148+ borderWidth : 1 ,
149+ } }
150+ />
151+ ) ;
152+ } ) }
153+ </ View >
154+
155+ < Text style = { [ styles . disabledText , styles . followerText ] } >
156+ Followed by Jane, John Wick, Miley Cyrus, and 23 others
157+ </ Text >
158+ </ View >
159+ </ LargeHeader >
160+ ) ;
161+ } ;
86162
87163const SomeComponent : SectionListRenderItem < number , { data : number [ ] } > = ( { index } ) => (
88164 < View style = { styles . children } >
@@ -139,7 +215,7 @@ const styles = StyleSheet.create({
139215 largeHeaderStyle : {
140216 flexDirection : 'column' ,
141217 gap : 12 ,
142- marginTop : AVATAR_SIZE_VALUE / 2 + VERTICAL_SPACING + BANNER_BOTTOM_HEIGHT_ADDITION ,
218+ // marginTop: AVATAR_SIZE_VALUE / 2 + VERTICAL_SPACING + BANNER_BOTTOM_HEIGHT_ADDITION,
143219 } ,
144220 backButtonContainer : {
145221 backgroundColor : 'rgba(0, 0, 0, 0.6)' ,
0 commit comments