diff options
author | Michael <michael.foiani@gmail.com> | 2021-07-02 15:56:56 -0400 |
---|---|---|
committer | Michael <michael.foiani@gmail.com> | 2021-07-02 15:56:56 -0400 |
commit | 222c7ab62e57f7dec41d8a14de3768ee9a63fc8e (patch) | |
tree | 98ec94309c3349ce5afea46728e1f3683196cef2 /src/components | |
parent | 8cb0b333a0d6fc36b909dc7256d1518f15ae5da4 (diff) |
Remove comments added from pr review. Also, clean some code that was suggested from pr review.
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/common/NavigationIcon.tsx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/components/common/NavigationIcon.tsx b/src/components/common/NavigationIcon.tsx index f97bb861..debb36b3 100644 --- a/src/components/common/NavigationIcon.tsx +++ b/src/components/common/NavigationIcon.tsx @@ -69,22 +69,15 @@ const NavigationIcon = (props: NavigationIconProps) => { return ( <View style={styles.container}> <TouchableOpacity {...props}> - <Image source={imgSrc} style={getStyles(props.isBigger ?? false)} /> + <Image + source={imgSrc} + style={props.isBigger ? styles.biggerIcon : styles.icon} + /> </TouchableOpacity> </View> ); }; -const getStyles = (isBigger: boolean) => - isBigger ? biggerIconStyles.icon : styles.icon; - -const biggerIconStyles = StyleSheet.create({ - icon: { - height: 44, - width: 44, - }, -}); - const styles = StyleSheet.create({ container: { flex: 1, @@ -101,6 +94,10 @@ const styles = StyleSheet.create({ height: 28, width: 28, }, + biggerIcon: { + height: 44, + width: 44, + }, }); export default NavigationIcon; |