Merge pull request #487 from lbryio/channel-page-header

add channel name to channel page
This commit is contained in:
Akinwale Ariwodola 2019-03-15 14:36:39 +01:00 committed by GitHub
commit 07209a79de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 3 deletions

View file

@ -6,6 +6,7 @@ import Colors from 'styles/colors';
import Button from 'component/button'; import Button from 'component/button';
import FileList from 'component/fileList'; import FileList from 'component/fileList';
import PageHeader from 'component/pageHeader'; import PageHeader from 'component/pageHeader';
import SubscribeButton from 'component/subscribeButton';
import UriBar from 'component/uriBar'; import UriBar from 'component/uriBar';
import channelPageStyle from 'styles/channelPage'; import channelPageStyle from 'styles/channelPage';
@ -82,7 +83,11 @@ class ChannelPage extends React.PureComponent {
return ( return (
<View style={channelPageStyle.container}> <View style={channelPageStyle.container}>
<PageHeader title={name} onBackPressed={() => navigateBack(navigation, drawerStack, popDrawerStack)} /> <UriBar value={uri} navigation={navigation} />
<View style={channelPageStyle.channelHeader}>
<Text style={channelPageStyle.channelName}>{name}</Text>
<SubscribeButton style={channelPageStyle.subscribeButton} uri={uri} name={name} />
</View>
{contentList} {contentList}
{(totalPages > 1) && this.state.showPageButtons && {(totalPages > 1) && this.state.showPageButtons &&
<View style={channelPageStyle.pageButtons}> <View style={channelPageStyle.pageButtons}>
@ -99,7 +104,6 @@ class ChannelPage extends React.PureComponent {
disabled={!!fetching} disabled={!!fetching}
onPress={this.handleNextPage} />} onPress={this.handleNextPage} />}
</View>} </View>}
<UriBar value={uri} navigation={navigation} />
</View> </View>
) )
} }

View file

@ -39,7 +39,7 @@ const channelPageStyle = StyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
position: 'absolute', position: 'absolute',
bottom: 76, bottom: 16,
paddingLeft: 16, paddingLeft: 16,
paddingRight: 16 paddingRight: 16
}, },
@ -50,6 +50,23 @@ const channelPageStyle = StyleSheet.create({
}, },
nextButton: { nextButton: {
alignSelf: 'flex-end' alignSelf: 'flex-end'
},
channelHeader: {
marginTop: 60,
marginLeft: 16,
marginRight: 16
},
channelName: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: 24,
marginTop: 16,
marginBottom: 8
},
subscribeButton: {
alignSelf: 'flex-start',
backgroundColor: Colors.White,
paddingLeft: 16,
paddingRight: 16
} }
}); });