diff --git a/src/Globals.ts b/src/Globals.ts index fb67255f2..77b166ebf 100644 --- a/src/Globals.ts +++ b/src/Globals.ts @@ -164,6 +164,7 @@ export default { BG_PUSHNOTIFY: '#FCF2E3', BG_ALLSET: '#F8ECFF', BG_OBSLIDER: '#F8ECFF', + BG_SEARCH_BAR: '#EFEFEF', // Notification IC_NOTIFICATION: '#e20880', @@ -174,6 +175,7 @@ export default { // Border BORDER_DEFAULT: '#C4CBD5', + BORDER_SEPARATOR: '#E5E5E5', }, SCREENS: { WELCOME: 'Welcome', diff --git a/src/components/ui/ChannelCategories.tsx b/src/components/ui/ChannelCategories.tsx index 5690aa415..e9ee865ee 100644 --- a/src/components/ui/ChannelCategories.tsx +++ b/src/components/ui/ChannelCategories.tsx @@ -21,7 +21,10 @@ const ChannelCategories: FC = ({ if (!isLoading && channelCategories?.length > 0) { return ( - + {channelCategories.map((item, index) => ( { }; return ( - <> - + + {/* Render Search Bar */} + { placeholderTextColor="#7D7F89" /> + - + {/* Render Channel Categories(tags) */} + - {channelResults.length === 0 && ( - - {!isLoading && !isLoadingSubscriptions ? ( - // Show channel not found label + {/* Render No Data View */} + {channelResults.length === 0 && ( + + {!isLoading && !isLoadingSubscriptions ? ( + // Show channel not found label + + ) : ( + // Show channel fetching label + <> + - ) : ( - // Show channel fetching label - <> - - - - )} - - )} + + )} + + )} - {channelResults.length !== 0 && !isLoadingSubscriptions && ( - `${item.name}-${index}-channel-key`} - initialNumToRender={20} - showsVerticalScrollIndicator={false} - ItemSeparatorComponent={() => } - onEndReached={loadMore} - onEndReachedThreshold={0.8} - renderItem={({item: channel}) => ( - - )} - ListFooterComponent={() => { - return isLoading || isLoadingMore ? ( - - - - ) : null; - }} - /> - )} - - + {/* Render Channel List */} + {channelResults.length !== 0 && !isLoadingSubscriptions && ( + `${item.name}-${index}-channel-key`} + initialNumToRender={20} + showsVerticalScrollIndicator={false} + ItemSeparatorComponent={() => } + onEndReached={loadMore} + onEndReachedThreshold={0.8} + renderItem={({item: channel}) => ( + + )} + ListFooterComponent={() => { + return isLoading || isLoadingMore ? ( + + + + ) : null; + }} + /> + )} + ); }; @@ -151,7 +155,6 @@ const ChannelsDisplayer = () => { const styles = StyleSheet.create({ container: { flex: 1, - paddingHorizontal: 16, backgroundColor: GLOBALS.COLORS.WHITE, }, channels: { @@ -161,6 +164,7 @@ const styles = StyleSheet.create({ channelListContentContainerStyle: { paddingTop: 10, paddingBottom: Platform.OS === 'android' ? 100 : 140, // Add some padding to the bottom to display last item content + paddingHorizontal: 16, }, infodisplay: { width: '100%', @@ -177,12 +181,15 @@ const styles = StyleSheet.create({ infoText: { marginVertical: 10, }, + searchBarWrapper: { + paddingHorizontal: 16, + marginBottom: 24, + }, searchView: { flexDirection: 'row', alignItems: 'center', borderRadius: 16, - backgroundColor: '#EFEFEF', - marginBottom: 24, + backgroundColor: GLOBALS.COLORS.BG_SEARCH_BAR, height: 42, paddingHorizontal: 8, }, @@ -200,7 +207,7 @@ const styles = StyleSheet.create({ }, seperator: { borderBottomWidth: 1, - borderColor: '#E5E5E5', + borderColor: GLOBALS.COLORS.BORDER_SEPARATOR, marginVertical: 24, }, footerLoadingView: {paddingVertical: 10},