reza fixed Faq no result

master
Reza_ashrafi 3 years ago
parent f9d8cee4f6
commit 7412be7d44
  1. 21
      src/screens/Faq/index.js

@ -6,6 +6,7 @@ import {
SafeAreaView, SafeAreaView,
Platform, Platform,
StatusBar, StatusBar,
Text,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { faq } from "../../redux/actions"; import { faq } from "../../redux/actions";
@ -47,7 +48,7 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
bookmark: false, bookmark: false,
qr: true, qr: true,
back: true, back: true,
backgroundColor: Colors.theme1['light'].greenCF + "0F", backgroundColor: Colors.theme1["light"].greenCF + "0F",
}} }}
/> />
<Header <Header
@ -67,15 +68,25 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
style={[tw("bg-white flex px-4 mb-4")]} style={[tw("bg-white flex px-4 mb-4")]}
contentContainerStyle={{ paddingBottom: height / 2.4 }} contentContainerStyle={{ paddingBottom: height / 2.4 }}
> >
{!search {!search ? (
? list.length > 0 && list.length &&
list.map((item, index) => ( list.map((item, index) => (
<Instance key={index} question={item} selectFaq={selectFaq} /> <Instance key={index} question={item} selectFaq={selectFaq} />
)) ))
: list.length > 0 && ) : list.length && searchResult.length ? (
searchResult.map((item, index) => ( searchResult.map((item, index) => (
<Instance key={index} question={item} selectFaq={selectFaq} /> <Instance key={index} question={item} selectFaq={selectFaq} />
))} ))
) : (
<Text
style={[
tw("w-full text-center mt-10"),
{ fontFamily: "regular", fontSize: width / 24 },
]}
>
سوالی یافت نشد.
</Text>
)}
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );

Loading…
Cancel
Save