Skip to content

Commit f3363f0

Browse files
committed
make pretty screen when there are no filters available
1 parent d80390d commit f3363f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/views/components/filter/filter-view.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {ScrollView, StyleSheet} from 'react-native'
44
import {type FilterType} from './types'
55
import {FilterSection} from './section'
66
import {TableView} from 'react-native-tableview-simple'
7+
import {NoticeView} from '../notice'
78

89
const styles = StyleSheet.create({
910
container: {
@@ -70,6 +71,10 @@ export class FilterView extends React.Component<Props, State> {
7071
}
7172

7273
render() {
74+
if (!this.state.filters.length) {
75+
return <NoticeView text="No filters available" />
76+
}
77+
7378
const contents = this.state.filters.map(filter => (
7479
<FilterSection
7580
key={filter.key}

0 commit comments

Comments
 (0)