From 593347d11dfa0d7c9d32cb79c2639041ce07d849 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 16 Mar 2021 13:11:06 -0400 Subject: using s3 url instead of image passed from backend --- src/components/profile/Avatar.tsx | 7 ++----- src/components/profile/Cover.tsx | 11 ++++------- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'src/components') diff --git a/src/components/profile/Avatar.tsx b/src/components/profile/Avatar.tsx index ba4ec36c..5d677983 100644 --- a/src/components/profile/Avatar.tsx +++ b/src/components/profile/Avatar.tsx @@ -19,11 +19,8 @@ const Avatar: React.FC = ({style, screenType, userXId}) => { return ( ); }; diff --git a/src/components/profile/Cover.tsx b/src/components/profile/Cover.tsx index a03ef123..b7502cff 100644 --- a/src/components/profile/Cover.tsx +++ b/src/components/profile/Cover.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {Image, StyleSheet, View} from 'react-native'; -import {IMAGE_WIDTH, COVER_HEIGHT, IMAGE_HEIGHT} from '../../constants'; import {useSelector} from 'react-redux'; +import {COVER_HEIGHT, IMAGE_WIDTH} from '../../constants'; import {RootState} from '../../store/rootreducer'; import {ScreenType} from '../../types'; @@ -10,7 +10,7 @@ interface CoverProps { screenType: ScreenType; } const Cover: React.FC = ({userXId, screenType}) => { - const {cover = ''} = userXId + const {cover} = userXId ? useSelector((state: RootState) => state.userX[screenType][userXId]) : useSelector((state: RootState) => state.user); @@ -18,11 +18,8 @@ const Cover: React.FC = ({userXId, screenType}) => { ); -- cgit v1.2.3-70-g09d2 From 0f406a2305421a69151e53af3c41350d9b976cc8 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 16 Mar 2021 13:19:37 -0400 Subject: comment out logs and removed unused code --- src/components/search/SearchBar.tsx | 4 ++-- src/components/search/SearchCategories.tsx | 18 ------------------ 2 files changed, 2 insertions(+), 20 deletions(-) (limited to 'src/components') diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx index 1a855f20..1d0021ad 100644 --- a/src/components/search/SearchBar.tsx +++ b/src/components/search/SearchBar.tsx @@ -70,8 +70,8 @@ const SearchBar: React.FC = ({ // TODO: FIGURE OUT WHY CHANGES IN placeholderId ARE NOT REFLECTED HERE // my thought: the value is set when the function is defined, so it keeps // its inital value of -1 forever. - console.log(`Previous ID: ${placeholderId}`); - console.log(`Next ID: ${nextId}`); + // console.log(`Previous ID: ${placeholderId}`); + // console.log(`Next ID: ${nextId}`); setPlaceholderId(nextId); }; diff --git a/src/components/search/SearchCategories.tsx b/src/components/search/SearchCategories.tsx index 4bae27c2..c747b34f 100644 --- a/src/components/search/SearchCategories.tsx +++ b/src/components/search/SearchCategories.tsx @@ -73,23 +73,5 @@ const styles = StyleSheet.create({ flexWrap: 'wrap', justifyContent: 'space-evenly', }, - buttonContainer: { - backgroundColor: 'transparent', - width: 158, - height: 37, - borderRadius: 20, - borderColor: 'transparent', - borderWidth: 1, - flexDirection: 'row', - alignContent: 'center', - justifyContent: 'center', - }, - buttonText: { - fontWeight: '400', - fontSize: 15, - lineHeight: 17.9, - alignSelf: 'center', - color: 'white', - }, }); export default SearchCategories; -- cgit v1.2.3-70-g09d2