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} {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,31 +67,30 @@ 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")]} <FlatList
data={searchResult} contentContainerStyle={{ paddingBottom: height / 2 }}
keyExtractor={(item, index) => { style={[tw("bg-white flex px-4 mb-4")]}
return index; data={searchResult}
}} keyExtractor={(item, index) => {
renderItem={({ item }) => ( return index;
<Instance question={item} selectFaq={selectFaq} /> }}
)} renderItem={({ item }) => (
/> <Instance question={item} selectFaq={selectFaq} />
)} */} )}
{search ? ( initialNumToRender={10}
<FlatList />
contentContainerStyle={{ paddingBottom: height / 2 }} ) : (
style={[tw("bg-white flex px-4 mb-4")]} <Text
data={searchResult} style={[
keyExtractor={(item, index) => { tw("w-full px-4 mt-10 text-center"),
return index; { fontFamily: "bold" },
}} ]}
renderItem={({ item }) => ( >
<Instance question={item} selectFaq={selectFaq} /> موردی یافت نشد.
)} </Text>
initialNumToRender={10} )
/>
) : ( ) : (
<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