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

Loading…
Cancel
Save