From 611dac558d37ce8153dfbef00964833fd976cc31 Mon Sep 17 00:00:00 2001 From: Leon Jiang <35908040+leonyjiang@users.noreply.github.com> Date: Mon, 17 Aug 2020 15:23:39 -0700 Subject: [TMA-25] Search Functionality (#33) * Create tabs gradient component * Add endpoint constant and types for search * Create search functionality * [TMA-19*] Abstracted out Social Icon logic (#32) * Basic mostly functional implementation Need to figure out why API is being called so much * Hey it works now! Without a million API calls! * Fixed bug where app would crash upon login Also updated property names to be more appropriate * Added post datetime and social icon * Updated error message * Fixed typecheck errors I don't know that these fixes are the best since I don't think they're generalizable * Formatted datetime in PostHeader * Abstracted out social icon switching logic * Basic mostly functional implementation Need to figure out why API is being called so much * Hey it works now! Without a million API calls! * Fixed bug where app would crash upon login Also updated property names to be more appropriate * Added post datetime and social icon * Updated error message * Fixed typecheck errors I don't know that these fixes are the best since I don't think they're generalizable * Abstracted out social icon switching logic * Change View to TouchableOpacity * Create tabs gradient component * Add endpoint constant and types for search * Create search functionality * Change View to TouchableOpacity Co-authored-by: Justin Shillingford --- src/components/common/TabsGradient.tsx | 23 +++++++++++++++++++++++ src/components/common/index.ts | 1 + 2 files changed, 24 insertions(+) create mode 100644 src/components/common/TabsGradient.tsx (limited to 'src/components/common') diff --git a/src/components/common/TabsGradient.tsx b/src/components/common/TabsGradient.tsx new file mode 100644 index 00000000..a95e8bc3 --- /dev/null +++ b/src/components/common/TabsGradient.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import LinearGradient from 'react-native-linear-gradient'; +import {StyleSheet} from 'react-native'; +import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; + +const TabsGradient: React.FC = () => { + return ( + + ); +}; +const styles = StyleSheet.create({ + gradient: { + position: 'absolute', + top: (SCREEN_HEIGHT / 10) * 9, + height: SCREEN_HEIGHT / 10, + width: SCREEN_WIDTH, + }, +}); +export default TabsGradient; diff --git a/src/components/common/index.ts b/src/components/common/index.ts index 8d0ef778..63a7b9c2 100644 --- a/src/components/common/index.ts +++ b/src/components/common/index.ts @@ -5,3 +5,4 @@ export {default as NavigationIcon} from './NavigationIcon'; export {default as GradientBackground} from './GradientBackground'; export {default as Post} from './post'; export {default as SocialIcon} from './SocialIcon'; +export {default as TabsGradient} from './TabsGradient'; -- cgit v1.2.3-70-g09d2