|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|