All files / app/(tabs) index.tsx

0% Statements 0/90
0% Branches 0/100
0% Functions 0/16
0% Lines 0/84

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 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
import React, { useState, useEffect, useCallback } from 'react';
import {
  View,
  Text,
  StyleSheet,
  FlatList,
  TouchableOpacity,
  ActivityIndicator,
  RefreshControl,
  Image,
} from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import { router } from 'expo-router';
import { useFocusEffect } from '@react-navigation/native';
import { useAuth } from '@/contexts/AuthContext';
import { useBeneficiary } from '@/contexts/BeneficiaryContext';
import { api } from '@/services/api';
import {
  AppColors,
  BorderRadius,
  FontSizes,
  FontWeights,
  Spacing,
  Shadows,
  AvatarSizes,
} from '@/constants/theme';
import type { Beneficiary } from '@/types';
import { isSubscriptionActive } from '@/services/subscription';
 
// Beneficiary card with equipment status support
interface BeneficiaryCardProps {
  beneficiary: Beneficiary;
  onPress: () => void;
  onActivate?: () => void;
}
 
// Equipment status config
const equipmentStatusConfig = {
  none: {
    icon: 'cart-outline' as const,
    label: 'Get kit',
    sublabel: 'Order equipment',
    color: AppColors.textMuted,
    bgColor: AppColors.backgroundSecondary,
  },
  ordered: {
    icon: 'cube-outline' as const,
    label: 'Kit ordered',
    sublabel: 'Preparing to ship',
    color: AppColors.info,
    bgColor: AppColors.infoLight,
  },
  shipped: {
    icon: 'car-outline' as const,
    label: 'In transit',
    sublabel: 'Track your package',
    color: AppColors.warning,
    bgColor: AppColors.warningLight,
  },
  delivered: {
    icon: 'checkmark-circle-outline' as const,
    label: 'Delivered',
    sublabel: 'Ready to activate',
    color: AppColors.success,
    bgColor: AppColors.successLight,
  },
  active: {
    icon: 'pulse-outline' as const,
    label: 'Monitoring',
    sublabel: 'System active',
    color: AppColors.success,
    bgColor: AppColors.successLight,
  },
};
 
function BeneficiaryCard({ beneficiary, onPress, onActivate }: BeneficiaryCardProps) {
  const equipmentStatus = beneficiary.equipmentStatus;
  const isAwaitingEquipment = equipmentStatus && ['ordered', 'shipped', 'delivered'].includes(equipmentStatus);
  const isEquipmentActive = equipmentStatus === 'active' || equipmentStatus === 'demo';
  const hasSubscription = isSubscriptionActive(beneficiary.subscription);
  const needsKit = !equipmentStatus || equipmentStatus === 'none';
 
  // Monitoring = equipment works + subscription active (all good!)
  const isMonitoring = isEquipmentActive && hasSubscription;
 
  // No subscription warning: equipment works but no subscription
  const hasNoSubscription = isEquipmentActive && !hasSubscription;
 
  const statusConfig = equipmentStatus ? equipmentStatusConfig[equipmentStatus as keyof typeof equipmentStatusConfig] : equipmentStatusConfig.none;
 
  // Use server-provided displayName (customName || originalName)
  const displayName = beneficiary.displayName;
 
  // Check if avatar is valid (not empty, null, or placeholder)
  const hasValidAvatar = beneficiary.avatar &&
    beneficiary.avatar.trim() !== '' &&
    !beneficiary.avatar.includes('placeholder');
 
  // Handle press - if delivered, go to activate
  const handlePress = () => {
    if (equipmentStatus === 'delivered' && onActivate) {
      onActivate();
    } else {
      onPress();
    }
  };
 
  return (
    <TouchableOpacity
      style={[styles.card, hasNoSubscription && styles.cardNoSubscription]}
      onPress={handlePress}
      activeOpacity={0.7}
    >
      {/* Avatar */}
      <View style={styles.avatarWrapper}>
        {hasValidAvatar ? (
          <Image
            key={beneficiary.avatar}
            source={{ uri: beneficiary.avatar }}
            style={styles.avatarImage}
          />
        ) : (
          <View style={[styles.avatar, hasNoSubscription && styles.avatarNoSubscription]}>
            <Text style={[styles.avatarText, hasNoSubscription && styles.avatarTextNoSubscription]}>
              {displayName.charAt(0).toUpperCase()}
            </Text>
          </View>
        )}
      </View>
 
      {/* Name and Status */}
      <View style={styles.info}>
        <Text style={styles.name} numberOfLines={1}>{displayName}</Text>
        {/* User's role for this beneficiary */}
        {beneficiary.role && (
          <Text style={styles.roleText}>
            You: {beneficiary.role.charAt(0).toUpperCase() + beneficiary.role.slice(1)}
          </Text>
        )}
        {/* Equipment status badge (awaiting delivery) */}
        {isAwaitingEquipment && statusConfig && (
          <View style={[styles.statusBadge, { backgroundColor: statusConfig.bgColor }]}>
            <Ionicons name={statusConfig.icon} size={14} color={statusConfig.color} />
            <Text style={[styles.statusText, { color: statusConfig.color }]}>
              {statusConfig.label}
            </Text>
          </View>
        )}
        {/* Monitoring badge (equipment works + subscription active) */}
        {isMonitoring && (
          <View style={[styles.statusBadge, { backgroundColor: equipmentStatusConfig.active.bgColor }]}>
            <Ionicons name={equipmentStatusConfig.active.icon} size={14} color={equipmentStatusConfig.active.color} />
            <Text style={[styles.statusText, { color: equipmentStatusConfig.active.color }]}>
              {equipmentStatusConfig.active.label}
            </Text>
          </View>
        )}
        {/* No subscription warning */}
        {hasNoSubscription && (
          <View style={styles.noSubscriptionBadge}>
            <Ionicons name="alert-circle" size={14} color={AppColors.error} />
            <Text style={styles.noSubscriptionText}>No subscription</Text>
          </View>
        )}
        {/* Get kit badge (no equipment) */}
        {needsKit && (
          <View style={[styles.statusBadge, { backgroundColor: equipmentStatusConfig.none.bgColor }]}>
            <Ionicons name={equipmentStatusConfig.none.icon} size={14} color={equipmentStatusConfig.none.color} />
            <Text style={[styles.statusText, { color: equipmentStatusConfig.none.color }]}>
              {equipmentStatusConfig.none.label}
            </Text>
          </View>
        )}
      </View>
 
      {/* Action button or Arrow */}
      {equipmentStatus === 'delivered' ? (
        <TouchableOpacity
          style={styles.activateButton}
          onPress={onActivate}
          activeOpacity={0.8}
        >
          <Text style={styles.activateButtonText}>Activate</Text>
        </TouchableOpacity>
      ) : (
        <View style={styles.arrowContainer}>
          <Ionicons name="chevron-forward" size={20} color={AppColors.textMuted} />
        </View>
      )}
    </TouchableOpacity>
  );
}
 
export default function HomeScreen() {
  const { user } = useAuth();
  const { currentBeneficiary, setCurrentBeneficiary } = useBeneficiary();
  const [isLoading, setIsLoading] = useState(true);
  const [isRefreshing, setIsRefreshing] = useState(false);
  const [beneficiaries, setBeneficiaries] = useState<Beneficiary[]>([]);
  const [error, setError] = useState<string | null>(null);
 
 
  // Load beneficiaries when screen is focused (after editing profile, etc.)
  // Use AbortController to cancel pending requests when screen loses focus
  useFocusEffect(
    useCallback(() => {
      const abortController = new AbortController();
      loadBeneficiaries(abortController.signal);
 
      return () => {
        abortController.abort();
      };
    }, [])
  );
 
  const loadBeneficiaries = async (signal?: AbortSignal, isRefresh = false) => {
    // Only show loading spinner on initial load, not on refresh
    if (!isRefresh) {
      setIsLoading(true);
    }
    setError(null);
    try {
      const onboardingCompleted = await api.isOnboardingCompleted();
 
      // Check if request was aborted
      if (signal?.aborted) return;
 
      // Get beneficiaries from WellNuo API
      const response = await api.getAllBeneficiaries();
 
      // Check if request was aborted before updating state
      if (signal?.aborted) return;
 
      if (response.ok && response.data) {
        setBeneficiaries(response.data);
 
        if (!currentBeneficiary && response.data.length > 0) {
          setCurrentBeneficiary(response.data[0]);
        }
      } else {
        if (response.error?.code === 'UNAUTHORIZED') {
          router.replace('/(auth)/login');
          return;
        }
        // Show error when API fails
        const errorMessage = response.error?.message || 'Failed to load beneficiaries';
        setError(errorMessage);
        setBeneficiaries([]);
      }
 
      // Redirect to onboarding if no beneficiaries
      const allBeneficiaries = response.ok ? (response.data || []) : [];
      if (allBeneficiaries.length === 0 && !onboardingCompleted) {
        router.replace({
          pathname: '/(auth)/add-loved-one',
          params: { email: user?.email || '' },
        });
        return;
      }
    } catch (err) {
      // Ignore abort errors
      if (err instanceof Error && err.name === 'AbortError') return;
      if (signal?.aborted) return;
 
      setError('Failed to load beneficiaries');
      setBeneficiaries([]);
    } finally {
      if (!signal?.aborted) {
        setIsLoading(false);
      }
    }
  };
 
  const handleRefresh = async () => {
    setIsRefreshing(true);
    await loadBeneficiaries(undefined, true);
    setIsRefreshing(false);
  };
 
  const handleBeneficiaryPress = (beneficiary: Beneficiary) => {
    // Null safety guard
    if (!beneficiary?.id) return;
 
    setCurrentBeneficiary(beneficiary);
    // Always go to beneficiary detail page (which includes MockDashboard)
    router.push(`/(tabs)/beneficiaries/${beneficiary.id}`);
  };
 
  const handleActivate = (beneficiary: Beneficiary) => {
    setCurrentBeneficiary(beneficiary);
    router.push({
      pathname: '/(auth)/activate',
      params: { lovedOneName: beneficiary.displayName, beneficiaryId: beneficiary.id.toString() },
    });
  };
 
  const getDisplayName = () => {
    // Check firstName/lastName from API
    if (user?.firstName) {
      return user.lastName ? `${user.firstName} ${user.lastName}` : user.firstName;
    }
    // Fallback to email prefix
    if (user?.email) return user.email.split('@')[0];
    return 'User';
  };
 
  const displayName = getDisplayName();
  const greeting = new Date().getHours() < 12 ? 'Good morning' : new Date().getHours() < 18 ? 'Good afternoon' : 'Good evening';
 
  if (isLoading) {
    return (
      <SafeAreaView style={styles.container} edges={['top']}>
        <View style={styles.header}>
          <View>
            <Text style={styles.greeting}>{greeting},</Text>
            <Text style={styles.displayName} numberOfLines={1}>{displayName}</Text>
          </View>
        </View>
        <View style={styles.loadingContainer}>
          <ActivityIndicator size="large" color={AppColors.primary} />
          <Text style={styles.loadingText}>Loading...</Text>
        </View>
      </SafeAreaView>
    );
  }
 
  return (
    <SafeAreaView style={styles.container} edges={['top']}>
      {/* Header */}
      <View style={styles.header}>
        <View style={styles.headerContent}>
          <View style={styles.greetingContainer}>
            <Text style={styles.greeting}>{greeting},</Text>
            <Text style={styles.displayName} numberOfLines={1}>{displayName}</Text>
          </View>
          <TouchableOpacity style={styles.headerAction} onPress={handleRefresh}>
            <Ionicons name="refresh" size={22} color={AppColors.primary} />
          </TouchableOpacity>
        </View>
      </View>
 
 
      {/* Error Message */}
      {error && (
        <View style={styles.errorContainer}>
          <View style={styles.errorContent}>
            <Ionicons name="alert-circle" size={24} color={AppColors.error} />
            <Text style={styles.errorText}>{error}</Text>
          </View>
          <TouchableOpacity style={styles.retryButton} onPress={handleRefresh}>
            <Text style={styles.retryButtonText}>Try Again</Text>
          </TouchableOpacity>
        </View>
      )}
 
      {/* Section Title */}
      {beneficiaries.length > 0 && !error && (
        <View style={styles.sectionHeader}>
          <Text style={styles.sectionTitle}>My Loved Ones</Text>
          <Text style={styles.sectionCount}>{beneficiaries.length}</Text>
        </View>
      )}
 
      {/* Content */}
      {beneficiaries.length === 0 && !error ? (
        <View style={styles.emptyContainer}>
          <View style={styles.emptyIconContainer}>
            <Ionicons name="people-outline" size={48} color={AppColors.primary} />
          </View>
          <Text style={styles.emptyTitle}>No loved ones yet</Text>
          <Text style={styles.emptyText}>
            Add a loved one to start monitoring their wellbeing and stay connected.
          </Text>
          <TouchableOpacity
            style={styles.addButtonLarge}
            onPress={() => router.push('/(auth)/add-loved-one')}
          >
            <Ionicons name="add" size={22} color={AppColors.white} />
            <Text style={styles.addButtonText}>Add Loved One</Text>
          </TouchableOpacity>
        </View>
      ) : (
        <>
          <FlatList
            data={beneficiaries}
            keyExtractor={(item) => item.id.toString()}
            renderItem={({ item }) => (
              <BeneficiaryCard
                beneficiary={item}
                onPress={() => handleBeneficiaryPress(item)}
                onActivate={() => handleActivate(item)}
              />
            )}
            contentContainerStyle={styles.listContent}
            showsVerticalScrollIndicator={false}
            refreshControl={
              <RefreshControl
                refreshing={isRefreshing}
                onRefresh={handleRefresh}
                colors={[AppColors.primary]}
                tintColor={AppColors.primary}
              />
            }
          />
          {/* Floating Add Button */}
          <TouchableOpacity
            style={styles.fab}
            onPress={() => router.push('/(auth)/add-loved-one')}
            activeOpacity={0.9}
          >
            <Ionicons name="add" size={28} color={AppColors.white} />
          </TouchableOpacity>
        </>
      )}
    </SafeAreaView>
  );
}
 
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: AppColors.background,
  },
  header: {
    paddingHorizontal: Spacing.lg,
    paddingTop: Spacing.md,
    paddingBottom: Spacing.lg,
    backgroundColor: AppColors.background,
  },
  headerContent: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
  },
  greetingContainer: {
    flex: 1,
    marginRight: Spacing.md,
  },
  greeting: {
    fontSize: FontSizes.base,
    color: AppColors.textSecondary,
    fontWeight: FontWeights.medium,
  },
  displayName: {
    fontSize: FontSizes['2xl'],
    fontWeight: FontWeights.bold,
    color: AppColors.textPrimary,
    marginTop: 2,
  },
  headerAction: {
    width: 44,
    height: 44,
    borderRadius: BorderRadius.lg,
    backgroundColor: AppColors.primaryLighter,
    justifyContent: 'center',
    alignItems: 'center',
  },
  sectionHeader: {
    flexDirection: 'row',
    alignItems: 'center',
    paddingHorizontal: Spacing.lg,
    marginBottom: Spacing.md,
  },
  sectionTitle: {
    fontSize: FontSizes.lg,
    fontWeight: FontWeights.semibold,
    color: AppColors.textPrimary,
  },
  sectionCount: {
    fontSize: FontSizes.sm,
    fontWeight: FontWeights.semibold,
    color: AppColors.primary,
    backgroundColor: AppColors.primaryLighter,
    paddingHorizontal: Spacing.sm,
    paddingVertical: 2,
    borderRadius: BorderRadius.full,
    marginLeft: Spacing.sm,
    overflow: 'hidden',
  },
  loadingContainer: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  loadingText: {
    marginTop: Spacing.md,
    fontSize: FontSizes.base,
    color: AppColors.textSecondary,
  },
  errorContainer: {
    marginHorizontal: Spacing.lg,
    marginBottom: Spacing.lg,
    padding: Spacing.lg,
    backgroundColor: AppColors.errorLight,
    borderRadius: BorderRadius.lg,
    borderWidth: 1,
    borderColor: AppColors.error,
  },
  errorContent: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: Spacing.sm,
  },
  errorText: {
    flex: 1,
    fontSize: FontSizes.base,
    color: AppColors.error,
    fontWeight: FontWeights.medium,
  },
  retryButton: {
    marginTop: Spacing.md,
    backgroundColor: AppColors.error,
    paddingVertical: Spacing.sm,
    paddingHorizontal: Spacing.lg,
    borderRadius: BorderRadius.md,
    alignSelf: 'flex-start',
  },
  retryButtonText: {
    color: AppColors.white,
    fontSize: FontSizes.sm,
    fontWeight: FontWeights.semibold,
  },
  emptyContainer: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    paddingHorizontal: Spacing.xl,
  },
  emptyIconContainer: {
    width: 96,
    height: 96,
    borderRadius: BorderRadius['2xl'],
    backgroundColor: AppColors.primaryLighter,
    justifyContent: 'center',
    alignItems: 'center',
    marginBottom: Spacing.lg,
  },
  emptyTitle: {
    fontSize: FontSizes.xl,
    fontWeight: FontWeights.bold,
    color: AppColors.textPrimary,
    marginBottom: Spacing.sm,
  },
  emptyText: {
    fontSize: FontSizes.base,
    color: AppColors.textSecondary,
    textAlign: 'center',
    lineHeight: 24,
    marginBottom: Spacing.xl,
  },
  addButtonLarge: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: AppColors.primary,
    paddingVertical: Spacing.md,
    paddingHorizontal: Spacing.xl,
    borderRadius: BorderRadius.lg,
    gap: Spacing.sm,
    ...Shadows.primary,
  },
  addButtonText: {
    fontSize: FontSizes.base,
    fontWeight: FontWeights.semibold,
    color: AppColors.white,
  },
  listContent: {
    paddingHorizontal: Spacing.lg,
    paddingBottom: 100,
  },
  // Card styles
  card: {
    backgroundColor: AppColors.surface,
    borderRadius: BorderRadius.xl,
    marginBottom: Spacing.md,
    padding: Spacing.md,
    flexDirection: 'row',
    alignItems: 'center',
    borderWidth: 2,
    borderColor: 'transparent',
    ...Shadows.sm,
  },
  cardNoSubscription: {
    borderColor: AppColors.error,
    backgroundColor: AppColors.errorLight,
  },
  avatarWrapper: {
    position: 'relative',
  },
  avatar: {
    width: AvatarSizes.md,
    height: AvatarSizes.md,
    borderRadius: AvatarSizes.md / 2,
    backgroundColor: AppColors.primaryLighter,
    justifyContent: 'center',
    alignItems: 'center',
  },
  avatarImage: {
    width: AvatarSizes.md,
    height: AvatarSizes.md,
    borderRadius: AvatarSizes.md / 2,
  },
  avatarText: {
    fontSize: FontSizes.xl,
    fontWeight: FontWeights.bold,
    color: AppColors.primary,
  },
  avatarNoSubscription: {
    backgroundColor: AppColors.errorLight,
  },
  avatarTextNoSubscription: {
    color: AppColors.error,
  },
  info: {
    flex: 1,
    marginLeft: Spacing.md,
    marginRight: Spacing.sm,
  },
  name: {
    fontSize: FontSizes.lg,
    fontWeight: FontWeights.semibold,
    color: AppColors.textPrimary,
  },
  roleText: {
    fontSize: FontSizes.xs,
    color: AppColors.textMuted,
    marginTop: 2,
  },
  noSubscriptionBadge: {
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: 4,
    gap: 4,
  },
  noSubscriptionText: {
    fontSize: FontSizes.xs,
    fontWeight: FontWeights.medium,
    color: AppColors.error,
  },
  statusBadge: {
    flexDirection: 'row',
    alignItems: 'center',
    paddingHorizontal: Spacing.sm,
    paddingVertical: 4,
    borderRadius: BorderRadius.md,
    marginTop: 4,
    alignSelf: 'flex-start',
    gap: 4,
  },
  statusText: {
    fontSize: FontSizes.xs,
    fontWeight: FontWeights.medium,
  },
  activateButton: {
    backgroundColor: AppColors.primary,
    paddingHorizontal: Spacing.md,
    paddingVertical: Spacing.sm,
    borderRadius: BorderRadius.md,
  },
  activateButtonText: {
    color: AppColors.white,
    fontSize: FontSizes.sm,
    fontWeight: FontWeights.semibold,
  },
  arrowContainer: {
    width: 32,
    height: 32,
    borderRadius: BorderRadius.md,
    backgroundColor: AppColors.surfaceSecondary,
    justifyContent: 'center',
    alignItems: 'center',
  },
  // Floating Action Button
  fab: {
    position: 'absolute',
    bottom: Spacing.xl,
    right: Spacing.lg,
    width: 60,
    height: 60,
    borderRadius: 30,
    backgroundColor: AppColors.primary,
    justifyContent: 'center',
    alignItems: 'center',
    ...Shadows.lg,
  },
});