/* eslint-disable react-native/no-inline-styles */ import React from 'react'; import { Text, View, ScrollView, TouchableOpacity } from 'react-native'; import AsyncStorage from '@react-native-async-storage/async-storage'; import { useNavigation } from '@react-navigation/native'; import Icon from 'react-native-vector-icons/Ionicons'; import { getStyles } from './dashboard.styles'; import { statCards } from '../../mock-data/dashboard'; import { useTheme } from '../../theme'; export const DashboardScreen = () => { const navigation = useNavigation(); const { theme: colors } = useTheme(); const styles = getStyles(colors); const handleLogout = async () => { try { await AsyncStorage.removeItem('userToken'); await AsyncStorage.removeItem('tenancyName'); } catch (e) { console.error(e); } navigation.reset({ index: 0, routes: [{ name: 'AuthStack' }], // root-level stack name stays as-is }); }; return ( {/* Hero Welcome banner */} Welcome Back, Workspace Admin Convex CRM • Active session {/* Grid of Stats */} Overview Metrics {statCards.map((stat, idx) => ( {stat.change} {stat.count} {stat.title} ))} {/* Recent Activity Section */} Recent Activity See All New Lead Created Sarah Jenkins added by System Import 2 minutes ago Invoice #1042 Sent Sent to Acme Corp for $1,250.00 1 hour ago Ticket #2045 Replied Support agent responded to email query 3 hours ago ); };