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 <jgs272@cornell.edu>
---
 src/components/search/SuggestedUser.tsx | 61 ---------------------------------
 1 file changed, 61 deletions(-)
 delete mode 100644 src/components/search/SuggestedUser.tsx

(limited to 'src/components/search/SuggestedUser.tsx')

diff --git a/src/components/search/SuggestedUser.tsx b/src/components/search/SuggestedUser.tsx
deleted file mode 100644
index 467e5e6c..00000000
--- a/src/components/search/SuggestedUser.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import React from 'react';
-import {View, StyleSheet, Text, ViewProps, Image} from 'react-native';
-import LinearGradient from 'react-native-linear-gradient';
-
-/**
- * Search Screen for user recommendations and a search
- * tool to allow user to find other users
- */
-
-interface SuggestedUserProps extends ViewProps {
-  name: string;
-}
-const SuggestedUser: React.FC<SuggestedUserProps> = ({name, style}) => {
-  return (
-    <View style={[styles.container, style]}>
-      <LinearGradient
-        colors={['#9F00FF', '#27EAE9']}
-        useAngle
-        angle={90}
-        angleCenter={{x: 0.5, y: 0.5}}
-        style={styles.gradient}>
-        <Image
-          source={require('../../assets/images/avatar-placeholder.png')}
-          style={styles.profile}
-        />
-      </LinearGradient>
-      <Text style={styles.name}>{name}</Text>
-      <Text style={styles.username}>{`@${name.split(' ').join('')}`}</Text>
-    </View>
-  );
-};
-
-const styles = StyleSheet.create({
-  container: {
-    alignItems: 'center',
-  },
-  gradient: {
-    height: 80,
-    width: 80,
-    borderRadius: 40,
-    justifyContent: 'center',
-    alignItems: 'center',
-    marginBottom: 10,
-  },
-  profile: {
-    height: 76,
-    width: 76,
-    borderRadius: 38,
-  },
-  name: {
-    fontWeight: '600',
-    fontSize: 16,
-    color: '#fff',
-  },
-  username: {
-    fontWeight: '600',
-    fontSize: 14,
-    color: '#fff',
-  },
-});
-export default SuggestedUser;
-- 
cgit v1.2.3-70-g09d2

