reza fixed faq not found

master
Reza_ashrafi 3 years ago
parent 663ad45c38
commit 9b2b46d3dc
  1. 4
      src/screens/Blog/index.js
  2. 32
      src/screens/Faq/index.js
  3. 4
      src/screens/Home/index.js

@ -170,10 +170,6 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
> >
{blog?.title} {blog?.title}
</Text> </Text>
{/* {console.log(
new DomParser()?.parseFromString(blog?.text, "text/html")
?.childNodes
)} */}
<HTMLView value={blog?.text} renderNode={renderNode} /> <HTMLView value={blog?.text} renderNode={renderNode} />
</View> </View>
<Header title={"پیشنهادی "} /> <Header title={"پیشنهادی "} />

@ -67,19 +67,8 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
placeholder={"بخشی از پرسش خود را اینجا بنویسید"} placeholder={"بخشی از پرسش خود را اینجا بنویسید"}
/> />
</View> </View>
{/* {search && searchResult.length !== 0 && ( {search.length ? (
<FlatList searchResult?.length ? (
style={[tw("bg-white flex px-4 mb-4")]}
data={searchResult}
keyExtractor={(item, index) => {
return index;
}}
renderItem={({ item }) => (
<Instance question={item} selectFaq={selectFaq} />
)}
/>
)} */}
{search ? (
<FlatList <FlatList
contentContainerStyle={{ paddingBottom: height / 2 }} contentContainerStyle={{ paddingBottom: height / 2 }}
style={[tw("bg-white flex px-4 mb-4")]} style={[tw("bg-white flex px-4 mb-4")]}
@ -92,6 +81,16 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
)} )}
initialNumToRender={10} initialNumToRender={10}
/> />
) : (
<Text
style={[
tw("w-full px-4 mt-10 text-center"),
{ fontFamily: "bold" },
]}
>
موردی یافت نشد.
</Text>
)
) : ( ) : (
<FlatList <FlatList
contentContainerStyle={{ paddingBottom: height / 2 }} contentContainerStyle={{ paddingBottom: height / 2 }}
@ -106,13 +105,6 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
initialNumToRender={10} initialNumToRender={10}
/> />
)} )}
{/* {search && searchResult.length === 0 && (
<Text
style={[tw("w-full px-4 mt-10 text-center"), { fontFamily: "bold" }]}
>
موردی یافت نشد.
</Text>
)} */}
</SafeAreaView> </SafeAreaView>
) : null; ) : null;
} }

@ -36,10 +36,6 @@ const Home = ({ route, blogs, books, userProducts, mobile }) => {
setPosition(position === "100%" ? "0%" : "100%"); setPosition(position === "100%" ? "0%" : "100%");
}; };
useEffect(() => {
console.log('route has been changed');
},[route]);
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{

Loading…
Cancel
Save