From 7412be7d4451a523a8473f679bfa1a25f5502465 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Thu, 14 Apr 2022 00:35:50 +0430 Subject: [PATCH] reza fixed Faq no result --- src/screens/Faq/index.js | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/screens/Faq/index.js b/src/screens/Faq/index.js index 6e82937..8d0ea9d 100644 --- a/src/screens/Faq/index.js +++ b/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", }} />
- {!search - ? list.length > 0 && - list.map((item, index) => ( - - )) - : list.length > 0 && - searchResult.map((item, index) => ( - - ))} + {!search ? ( + list.length && + list.map((item, index) => ( + + )) + ) : list.length && searchResult.length ? ( + searchResult.map((item, index) => ( + + )) + ) : ( + + سوالی یافت نشد. + + )} );