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/profile/Content.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/components/profile') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index 82b5fdc0..49cc2c35 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -1,7 +1,6 @@ import React, {useState} from 'react'; import {StyleSheet, LayoutChangeEvent} from 'react-native'; import Animated from 'react-native-reanimated'; -const {ScrollView} = Animated; import {UserType} from '../../types'; import ProfileCutout from './ProfileCutout'; @@ -9,8 +8,6 @@ import ProfileHeader from './ProfileHeader'; import ProfileBody from './ProfileBody'; import MomentsBar from './MomentsBar'; import Feed from './Feed'; -import LinearGradient from 'react-native-linear-gradient'; -import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; interface ContentProps { y: Animated.Value; @@ -23,7 +20,7 @@ const Content: React.FC = ({y, user}) => { setProfileBodyHeight(height); }; return ( - y.setValue(e.nativeEvent.contentOffset.y)} showsVerticalScrollIndicator={false} @@ -35,12 +32,7 @@ const Content: React.FC = ({y, user}) => { - - + ); }; @@ -48,11 +40,6 @@ const styles = StyleSheet.create({ container: { flex: 1, }, - gradient: { - height: SCREEN_HEIGHT, - width: SCREEN_WIDTH, - position: 'absolute', - }, }); export default Content; -- cgit v1.2.3-70-g09d2