Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | import React, { useState } from 'react';
import {
View,
Text,
StyleSheet,
ScrollView,
TouchableOpacity,
TextInput,
Linking,
} from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import { AppColors, BorderRadius, FontSizes, Spacing, FontWeights } from '@/constants/theme';
import { PageHeader } from '@/components/PageHeader';
interface FAQItemProps {
question: string;
answer: string;
isExpanded: boolean;
onToggle: () => void;
}
function FAQItem({ question, answer, isExpanded, onToggle }: FAQItemProps) {
return (
<TouchableOpacity style={styles.faqItem} onPress={onToggle} activeOpacity={0.7}>
<View style={styles.faqHeader}>
<Text style={styles.faqQuestion}>{question}</Text>
<Ionicons
name={isExpanded ? 'chevron-up' : 'chevron-down'}
size={20}
color={AppColors.textMuted}
/>
</View>
{isExpanded && (
<Text style={styles.faqAnswer}>{answer}</Text>
)}
</TouchableOpacity>
);
}
export default function HelpScreen() {
const [searchQuery, setSearchQuery] = useState('');
const [expandedFAQ, setExpandedFAQ] = useState<number | null>(null);
const faqs = [
{
question: 'How do I add a new beneficiary?',
answer: 'Tap the "+" button on the Home screen or go to Add Loved One. Enter their name, activate your WellNuo kit with the 6-digit code, and follow the setup instructions.',
},
{
question: 'What does the wellness score mean?',
answer: 'The wellness score (0-100%) reflects the overall health pattern of your beneficiary based on daily activities, sleep patterns, movement data, and sensor readings. A score above 70% indicates healthy patterns, 40-70% suggests some concerns, and below 40% may require attention.',
},
{
question: 'How often is the data updated?',
answer: 'Sensor data is collected in real-time and synced every few minutes. Dashboard summaries are calculated daily. Emergency alerts are instant and will notify you immediately.',
},
{
question: 'What triggers an emergency alert?',
answer: 'Emergency alerts are triggered by: falls detected by motion sensors, prolonged inactivity exceeding normal patterns, SOS button press by the beneficiary, and abnormal environmental readings.',
},
{
question: 'Can I share access with family members?',
answer: 'Yes! Multiple family members can monitor the same beneficiary. Each caregiver will have their own account and can set their own notification preferences.',
},
{
question: 'How do I change notification settings?',
answer: 'Go to Profile > Settings to customize your alert preferences. You can enable or disable push notifications and email alerts.',
},
{
question: 'Is my data secure?',
answer: 'Yes. WellNuo uses encryption for all data transmission. Your data is stored securely, and we never share personal information with third parties.',
},
{
question: 'What devices are in the Starter Kit?',
answer: 'The WellNuo Starter Kit includes: motion sensor (PIR), door/window sensor, temperature & humidity sensor, and the WellNuo Hub that connects everything.',
},
{
question: 'How do I activate my kit?',
answer: 'After purchase, you\'ll receive a 6-digit activation code. Go to Add Loved One, enter the code, and the app will guide you through connecting each sensor.',
},
{
question: 'What if a sensor goes offline?',
answer: 'Check that the sensor has battery power and is within range of the WellNuo Hub. You can see sensor status on the beneficiary detail page. If issues persist, contact support.',
},
];
const filteredFAQs = faqs.filter(
faq =>
faq.question.toLowerCase().includes(searchQuery.toLowerCase()) ||
faq.answer.toLowerCase().includes(searchQuery.toLowerCase())
);
return (
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
<PageHeader title="Help Center" />
<ScrollView showsVerticalScrollIndicator={false}>
{/* Search */}
<View style={styles.searchSection}>
<View style={styles.searchContainer}>
<Ionicons name="search" size={20} color={AppColors.textMuted} />
<TextInput
style={styles.searchInput}
placeholder="Search FAQ..."
placeholderTextColor={AppColors.textMuted}
value={searchQuery}
onChangeText={setSearchQuery}
/>
{searchQuery.length > 0 && (
<TouchableOpacity onPress={() => setSearchQuery('')}>
<Ionicons name="close-circle" size={20} color={AppColors.textMuted} />
</TouchableOpacity>
)}
</View>
</View>
{/* FAQs */}
<View style={styles.section}>
<Text style={styles.sectionTitle}>Frequently Asked Questions</Text>
<View style={styles.faqContainer}>
{filteredFAQs.length > 0 ? (
filteredFAQs.map((faq, index) => (
<View key={index}>
<FAQItem
question={faq.question}
answer={faq.answer}
isExpanded={expandedFAQ === index}
onToggle={() => setExpandedFAQ(expandedFAQ === index ? null : index)}
/>
{index < filteredFAQs.length - 1 && <View style={styles.faqDivider} />}
</View>
))
) : (
<View style={styles.noResults}>
<Ionicons name="search-outline" size={48} color={AppColors.textMuted} />
<Text style={styles.noResultsText}>No results found</Text>
<Text style={styles.noResultsHint}>Try different keywords</Text>
</View>
)}
</View>
</View>
{/* Contact Support */}
<View style={styles.section}>
<Text style={styles.sectionTitle}>Contact Support</Text>
<View style={styles.contactCard}>
<View style={styles.contactItem}>
<View style={styles.contactIcon}>
<Ionicons name="mail" size={22} color={AppColors.primary} />
</View>
<View style={styles.contactInfo}>
<Text style={styles.contactLabel}>Email</Text>
<TouchableOpacity onPress={() => Linking.openURL('mailto:support@wellnuo.com')}>
<Text style={styles.contactValue}>support@wellnuo.com</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.contactDivider} />
<View style={styles.contactItem}>
<View style={styles.contactIcon}>
<Ionicons name="call" size={22} color={AppColors.primary} />
</View>
<View style={styles.contactInfo}>
<Text style={styles.contactLabel}>Phone</Text>
<TouchableOpacity onPress={() => Linking.openURL('tel:+18005551234')}>
<Text style={styles.contactValue}>1-800-555-1234</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.contactDivider} />
<View style={styles.contactItem}>
<View style={styles.contactIcon}>
<Ionicons name="time" size={22} color={AppColors.primary} />
</View>
<View style={styles.contactInfo}>
<Text style={styles.contactLabel}>Hours</Text>
<Text style={styles.contactHours}>Mon - Fri: 9am - 6pm EST</Text>
</View>
</View>
</View>
</View>
{/* Spacer for bottom */}
<View style={{ height: Spacing.xl }} />
</ScrollView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: AppColors.background,
},
searchSection: {
padding: Spacing.lg,
},
searchContainer: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: AppColors.surface,
borderRadius: BorderRadius.lg,
paddingHorizontal: Spacing.md,
paddingVertical: Spacing.sm,
},
searchInput: {
flex: 1,
marginLeft: Spacing.sm,
fontSize: FontSizes.base,
color: AppColors.textPrimary,
},
section: {
marginTop: Spacing.sm,
},
sectionTitle: {
fontSize: FontSizes.xs,
fontWeight: FontWeights.semibold,
color: AppColors.textMuted,
paddingHorizontal: Spacing.lg,
paddingVertical: Spacing.sm,
textTransform: 'uppercase',
letterSpacing: 0.5,
},
faqContainer: {
backgroundColor: AppColors.surface,
marginHorizontal: Spacing.lg,
borderRadius: BorderRadius.xl,
},
faqItem: {
paddingVertical: Spacing.md,
paddingHorizontal: Spacing.lg,
},
faqHeader: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
faqQuestion: {
flex: 1,
fontSize: FontSizes.base,
fontWeight: FontWeights.medium,
color: AppColors.textPrimary,
marginRight: Spacing.sm,
},
faqAnswer: {
fontSize: FontSizes.sm,
color: AppColors.textSecondary,
marginTop: Spacing.sm,
lineHeight: 20,
},
faqDivider: {
height: 1,
backgroundColor: AppColors.borderLight,
marginHorizontal: Spacing.lg,
},
noResults: {
alignItems: 'center',
paddingVertical: Spacing.xl,
},
noResultsText: {
fontSize: FontSizes.base,
fontWeight: FontWeights.medium,
color: AppColors.textPrimary,
marginTop: Spacing.md,
},
noResultsHint: {
fontSize: FontSizes.sm,
color: AppColors.textMuted,
marginTop: Spacing.xs,
},
contactCard: {
backgroundColor: AppColors.surface,
marginHorizontal: Spacing.lg,
borderRadius: BorderRadius.xl,
padding: Spacing.md,
},
contactItem: {
flexDirection: 'row',
alignItems: 'center',
paddingVertical: Spacing.sm,
},
contactIcon: {
width: 44,
height: 44,
borderRadius: BorderRadius.lg,
backgroundColor: AppColors.primarySubtle,
justifyContent: 'center',
alignItems: 'center',
marginRight: Spacing.md,
},
contactInfo: {
flex: 1,
},
contactLabel: {
fontSize: FontSizes.xs,
color: AppColors.textMuted,
marginBottom: 2,
},
contactValue: {
fontSize: FontSizes.base,
fontWeight: FontWeights.medium,
color: AppColors.primary,
},
contactHours: {
fontSize: FontSizes.base,
color: AppColors.textPrimary,
},
contactDivider: {
height: 1,
backgroundColor: AppColors.borderLight,
marginLeft: 56,
},
});
|