diff --git a/app/(tabs)/beneficiaries/[id]/index.tsx b/app/(tabs)/beneficiaries/[id]/index.tsx
index 6242fec..402a482 100644
--- a/app/(tabs)/beneficiaries/[id]/index.tsx
+++ b/app/(tabs)/beneficiaries/[id]/index.tsx
@@ -125,45 +125,47 @@ export default function BeneficiaryDetailScreen() {
{beneficiary.name}
- {beneficiary.relationship}
+ {beneficiary.address && (
+ {beneficiary.address}
+ )}
- Last activity: {beneficiary.last_activity}
+ {beneficiary.last_location ? `📍 ${beneficiary.last_location}` : ''} • {beneficiary.last_activity || 'No recent activity'}
- {/* Sensor Stats */}
+ {/* Sensor Stats - using real API data */}
Sensor Overview
-
+
- {beneficiary.sensor_data?.motion_detected ? 'Active' : 'Inactive'}
+ {beneficiary.status === 'online' ? 'Active' : 'Inactive'}
- Motion
- {beneficiary.sensor_data?.last_motion || '--'}
+ Status
+ {beneficiary.last_activity || '--'}
-
+
-
- {beneficiary.sensor_data?.door_status === 'open' ? 'Open' : 'Closed'}
+
+ {beneficiary.last_location || '--'}
- Door Status
- Main entrance
+ Location
+ {beneficiary.before_last_location || '--'}
@@ -171,10 +173,48 @@ export default function BeneficiaryDetailScreen() {
- {beneficiary.sensor_data?.temperature || '--'}°C
+ {beneficiary.temperature?.toFixed(1) || '--'}{beneficiary.units || '°F'}
Temperature
- {beneficiary.sensor_data?.humidity || '--'}% humidity
+ Bedroom: {beneficiary.bedroom_temperature?.toFixed(1) || '--'}{beneficiary.units || '°F'}
+
+
+
+ {/* Additional stats row */}
+
+
+
+
+
+
+ {beneficiary.sleep_hours?.toFixed(1) || '--'}h
+
+ Sleep
+
+
+
+ = 70 ? '#D1FAE5' : '#FEF3C7' }]}>
+ = 70 ? AppColors.success : AppColors.warning}
+ />
+
+
+ {beneficiary.wellness_score || '--'}%
+
+ Wellness
+ {beneficiary.wellness_descriptor || '--'}
+
+
+
+
+
+
+
+ {beneficiary.address?.split(',')[0] || '--'}
+
+ Address
diff --git a/app/(tabs)/profile/_layout.tsx b/app/(tabs)/profile/_layout.tsx
new file mode 100644
index 0000000..ed7390d
--- /dev/null
+++ b/app/(tabs)/profile/_layout.tsx
@@ -0,0 +1,6 @@
+import { Slot } from 'expo-router';
+
+export default function ProfileLayout() {
+ // Using Slot instead of Stack to keep tab bar visible
+ return ;
+}
diff --git a/app/profile/about.tsx b/app/(tabs)/profile/about.tsx
similarity index 80%
rename from app/profile/about.tsx
rename to app/(tabs)/profile/about.tsx
index d68f6f2..321a2fa 100644
--- a/app/profile/about.tsx
+++ b/app/(tabs)/profile/about.tsx
@@ -11,6 +11,7 @@ import {
import { Ionicons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import { AppColors, BorderRadius, FontSizes, Spacing } from '@/constants/theme';
+import { PageHeader } from '@/components/PageHeader';
interface InfoRowProps {
label: string;
@@ -48,14 +49,16 @@ export default function AboutScreen() {
};
return (
-
+
+
{/* App Logo & Name */}
-
-
-
- WellNuo
+
Caring for Those Who Matter Most
@@ -156,32 +159,6 @@ export default function AboutScreen() {
title="Follow on Twitter"
onPress={() => openURL('https://twitter.com/wellnuo')}
/>
-
- openURL('https://github.com/wellnuo')}
- />
-
-
-
- {/* Acknowledgments */}
-
- Acknowledgments
-
-
- WellNuo uses the following open-source software:
-
- • React Native (MIT License)
- • Expo (MIT License)
- • React Navigation (MIT License)
- • And many other wonderful packages
- openURL('https://wellnuo.com/licenses')}
- >
- View All Licenses
-
@@ -208,19 +185,10 @@ const styles = StyleSheet.create({
paddingVertical: Spacing.xl,
backgroundColor: AppColors.background,
},
- logoContainer: {
- width: 100,
+ logoImage: {
+ width: 180,
height: 100,
- borderRadius: 24,
- backgroundColor: AppColors.primary,
- justifyContent: 'center',
- alignItems: 'center',
- marginBottom: Spacing.md,
- },
- appName: {
- fontSize: 32,
- fontWeight: '700',
- color: AppColors.textPrimary,
+ marginBottom: Spacing.sm,
},
appTagline: {
fontSize: FontSizes.base,
@@ -313,28 +281,6 @@ const styles = StyleSheet.create({
backgroundColor: AppColors.border,
marginLeft: Spacing.lg + 20 + Spacing.md,
},
- acknowledgment: {
- fontSize: FontSizes.sm,
- color: AppColors.textSecondary,
- paddingHorizontal: Spacing.lg,
- paddingVertical: Spacing.sm,
- },
- license: {
- fontSize: FontSizes.xs,
- color: AppColors.textMuted,
- paddingHorizontal: Spacing.lg,
- paddingVertical: 2,
- },
- viewLicenses: {
- marginTop: Spacing.md,
- paddingVertical: Spacing.sm,
- alignItems: 'center',
- },
- viewLicensesText: {
- fontSize: FontSizes.sm,
- color: AppColors.primary,
- fontWeight: '500',
- },
footer: {
alignItems: 'center',
paddingVertical: Spacing.xl,
diff --git a/app/profile/edit.tsx b/app/(tabs)/profile/edit.tsx
similarity index 98%
rename from app/profile/edit.tsx
rename to app/(tabs)/profile/edit.tsx
index c506506..70d3597 100644
--- a/app/profile/edit.tsx
+++ b/app/(tabs)/profile/edit.tsx
@@ -14,6 +14,7 @@ import { Ionicons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import { router } from 'expo-router';
import { useAuth } from '@/contexts/AuthContext';
+import { PageHeader } from '@/components/PageHeader';
import { AppColors, BorderRadius, FontSizes, Spacing } from '@/constants/theme';
export default function EditProfileScreen() {
@@ -58,7 +59,8 @@ export default function EditProfileScreen() {
};
return (
-
+
+
+
+
{/* Search */}
diff --git a/app/(tabs)/profile.tsx b/app/(tabs)/profile/index.tsx
similarity index 90%
rename from app/(tabs)/profile.tsx
rename to app/(tabs)/profile/index.tsx
index 2f9b61b..18dfac4 100644
--- a/app/(tabs)/profile.tsx
+++ b/app/(tabs)/profile/index.tsx
@@ -57,7 +57,6 @@ export default function ProfileScreen() {
// Settings states
const [pushNotifications, setPushNotifications] = useState(true);
const [emailNotifications, setEmailNotifications] = useState(false);
- const [darkMode, setDarkMode] = useState(false);
const [biometricLogin, setBiometricLogin] = useState(false);
const handleLogout = () => {
@@ -80,17 +79,17 @@ export default function ProfileScreen() {
};
// Navigation handlers - now using actual page navigation
- const handleEditProfile = () => router.push('/profile/edit');
- const handleNotifications = () => router.push('/profile/notifications');
- const handlePrivacy = () => router.push('/profile/privacy');
- const handleUpgrade = () => router.push('/profile/subscription');
- const handlePayment = () => router.push('/profile/subscription');
- const handleHelp = () => router.push('/profile/help');
- const handleSupport = () => router.push('/profile/support');
- const handleTerms = () => router.push('/profile/terms');
- const handlePrivacyPolicy = () => router.push('/profile/privacy-policy');
- const handleLanguage = () => router.push('/profile/language');
- const handleAbout = () => router.push('/profile/about');
+ const handleEditProfile = () => router.push('/(tabs)/profile/edit');
+ const handleNotifications = () => router.push('/(tabs)/profile/notifications');
+ const handlePrivacy = () => router.push('/(tabs)/profile/privacy');
+ const handleUpgrade = () => router.push('/(tabs)/profile/subscription');
+ const handlePayment = () => router.push('/(tabs)/profile/subscription');
+ const handleHelp = () => router.push('/(tabs)/profile/help');
+ const handleSupport = () => router.push('/(tabs)/profile/support');
+ const handleTerms = () => router.push('/(tabs)/profile/terms');
+ const handlePrivacyPolicy = () => router.push('/(tabs)/profile/privacy-policy');
+ const handleLanguage = () => router.push('/(tabs)/profile/language');
+ const handleAbout = () => router.push('/(tabs)/profile/about');
const handleDevInfo = () => {
Alert.alert(
@@ -221,27 +220,6 @@ export default function ProfileScreen() {
}
/>
-