From c1867dcac9bb672e3bfd9c870955277144963d29 Mon Sep 17 00:00:00 2001 From: Nikolai R Kristiansen Date: Tue, 12 Oct 2021 20:08:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20EventList=20minimal=20styling=20?= =?UTF-8?q?fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/events/EventList.js | 28 ++++++++++++++-------------- src/modules/login/Login.js | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/modules/events/EventList.js b/src/modules/events/EventList.js index c15effc..275f6c0 100644 --- a/src/modules/events/EventList.js +++ b/src/modules/events/EventList.js @@ -1,5 +1,5 @@ -import { StyleSheet, View, Platform, SectionList, TouchableHighlight } from 'react-native'; -import { Card, Text, Icon, Button, Spinner } from 'native-base'; +import { StyleSheet, View, Platform, SectionList, TouchableOpacity } from 'react-native'; +import { Card, Text, Button, Spinner, ArrowForwardIcon, HStack } from 'native-base'; import React from 'react'; import moment from 'moment'; import 'moment/locale/nb'; @@ -14,13 +14,13 @@ const _formatTime = (time) => { const EventList = ({ eventsSectioned, refreshing, handleRefresh, handleLoadMore, showEvent, error, loading }) => { const _renderItem = ({ item }) => ( - { showEvent(item); }} style={styles.listItem} > - + {item.title.decoded} @@ -28,18 +28,16 @@ const EventList = ({ eventsSectioned, refreshing, handleRefresh, handleLoadMore, {_formatTime(item.start_time)} - + - - + + ); const _renderSectionHeader = ({ section }) => { return ( - - {section.title} - + {section.title} ); }; @@ -97,7 +95,9 @@ export default EventList; const styles = StyleSheet.create({ listItem: { backgroundColor: 'white', - marginLeft: 0, + padding: 8, + borderBottomWidth: 1, + borderBottomColor: '#ccc', }, listItemTitle: { fontSize: 14, @@ -108,12 +108,12 @@ const styles = StyleSheet.create({ }, sectionHeader: { backgroundColor: 'white', - marginLeft: 0, ...Platform.select({ ios: { marginBottom: -8 }, }), - paddingBottom: 0, - borderBottomWidth: 0, + paddingTop: 8, + paddingLeft: 8, + paddingRight: 8, }, sectionTitle: { fontSize: 16, diff --git a/src/modules/login/Login.js b/src/modules/login/Login.js index ebd5e12..c60d395 100644 --- a/src/modules/login/Login.js +++ b/src/modules/login/Login.js @@ -8,8 +8,8 @@ import useLogin from './useLogin'; import FormInput from '../../components/FormInput'; import FormErrors from '../../components/FormErrors'; -const Login = ({ onLogin }) => { - const { isLoggingIn, errors, control, setFocus, onSubmit } = useLogin(onLogin); +const Login = () => { + const { isLoggingIn, errors, control, setFocus, onSubmit } = useLogin(); return (