reza fixed faq not found

master
Reza_ashrafi 3 years ago
parent 663ad45c38
commit 9b2b46d3dc
  1. 4
      src/screens/Blog/index.js
  2. 56
      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}
</Text>
{/* {console.log(
new DomParser()?.parseFromString(blog?.text, "text/html")
?.childNodes
)} */}
<HTMLView value={blog?.text} renderNode={renderNode} />
</View>
<Header title={"پیشنهادی "} />

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

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

Loading…
Cancel
Save