import { View, Text, TextInput, ScrollView } from 'react-native' import React, { useState } from 'react' import TabBar from '../themes/TabBar' import { ChevronLeftIcon, MagnifyingGlassIcon } from 'react-native-heroicons/outline' import { widthPercentageToDP as wp, heightPercentageToDP as hp, heightPercentageToDP } from 'react-native-responsive-screen'; import { TouchableOpacity } from 'react-native' import ContactUsCenter from '../components/ContactUsCenter' import FaqCenter from '../components/FaqCenter' import { useNavigation } from '@react-navigation/native'; export default function HelpCenterScreen() { const navigation = useNavigation() const helpState = ["FAQ", "Contact Us"] const [initialValue, setValue] = useState(0) const renderHelpState = () => { switch (initialValue) { case 0: return case 1: return default: return This Help State is not Valid } } return ( } titleStyle={{ color: "black", fontWeight: "bold", fontSize: 20 }} prefixStyle={{ backgroundColor: "transparent" }} suffixStyle={{ backgroundColor: "white", borderWidth: 1, borderColor: "black" }} containerStyle="" suffixAction={() => navigation.goBack()} /> { helpState.map((item, index) => { const isActive = initialValue == index return ( setValue(index)} key={index} className={`flex-1 flex-row justify-center items-center py-4 border-b-[4px] rounded-[2px] ${isActive ? " border-primary" : "border-white"}`}> {item} ) }) } {renderHelpState()} ) }