reza fixed Faq no result

master
Reza_ashrafi 3 years ago
parent f9d8cee4f6
commit 7412be7d44
  1. 25
      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";
@ -23,7 +24,7 @@ import Instance from "./components/Instance";
//assets
import bgFaq from "./assets/faq.png";
const {width, height} = Dimensions.get("window");
const { width, height } = Dimensions.get("window");
function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
useEffect(() => {
@ -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
@ -65,17 +66,27 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
</View>
<ScrollView
style={[tw("bg-white flex px-4 mb-4")]}
contentContainerStyle={{paddingBottom: height / 2.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