Skip to content
Snippets Groups Projects
Commit 2680851b authored by Dirk Doesburg's avatar Dirk Doesburg
Browse files

fixed codestyle

parent c2c29852
No related branches found
No related tags found
1 merge request!398"Search for Calendar events"
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { import {
SectionList, Text, View, ScrollView, RefreshControl SectionList, Text, View, ScrollView, RefreshControl,
} from 'react-native'; } from 'react-native';
import { withTranslation } from 'react-i18next'; import { withTranslation } from 'react-i18next';
import Moment from 'moment'; import Moment from 'moment';
...@@ -126,7 +126,7 @@ class CalendarScreen extends Component { ...@@ -126,7 +126,7 @@ class CalendarScreen extends Component {
componentDidMount() { componentDidMount() {
this.props.refresh(); this.props.refresh();
} }
search = (keywords) => { search = (keywords) => {
clearTimeout(this.searchTimeout); clearTimeout(this.searchTimeout);
this.searchTimeout = setTimeout(() => { this.searchTimeout = setTimeout(() => {
...@@ -141,13 +141,13 @@ class CalendarScreen extends Component { ...@@ -141,13 +141,13 @@ class CalendarScreen extends Component {
const header = ( const header = (
<SearchHeader <SearchHeader
title={t('Calendar')} title={t('Calendar')}
searchText={t('Find an event')} searchText={t('Find an event')}
search={this.search} search={this.search}
searchKey={keywords} searchKey={keywords}
/> />
); );
let content = ( let content = (
<SectionList <SectionList
style={styles.sectionList} style={styles.sectionList}
...@@ -174,7 +174,6 @@ class CalendarScreen extends Component { ...@@ -174,7 +174,6 @@ class CalendarScreen extends Component {
} else if (eventList.length === 0) { } else if (eventList.length === 0) {
content = <ErrorScreen message={t('No events found!')} />; content = <ErrorScreen message={t('No events found!')} />;
} else { } else {
return ( return (
<View style={styles.wrapper}> <View style={styles.wrapper}>
{header} {header}
...@@ -191,11 +190,11 @@ class CalendarScreen extends Component { ...@@ -191,11 +190,11 @@ class CalendarScreen extends Component {
<ScrollView <ScrollView
refreshControl={( refreshControl={(
<RefreshControl <RefreshControl
refreshing={loading} refreshing={loading}
onRefresh={refresh} onRefresh={refresh}
/> />
)} )}
> >
<DismissKeyboardView contentStyle={styles.keyboardView}> <DismissKeyboardView contentStyle={styles.keyboardView}>
{content} {content}
</DismissKeyboardView> </DismissKeyboardView>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment