Add WellNuo logo to Dashboard header
Replaced "Dashboard" text with app logo image in header: - Import Image component from react-native - Replace Text with Image (icon.png) in both header states - Add logo style: 36x36px with horizontal margins - Remove unused headerTitle and headerTitleWithBack styles - Refresh button now uses marginLeft: 'auto' for proper spacing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5fc7586f09
commit
b5eef6760c
@ -1,5 +1,5 @@
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { View, Text, StyleSheet, ActivityIndicator, TouchableOpacity } from 'react-native';
|
||||
import { View, Text, StyleSheet, ActivityIndicator, TouchableOpacity, Image } from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { Ionicons } from '@expo/vector-icons';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
@ -40,7 +40,11 @@ export default function DashboardScreen() {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<View style={styles.header}>
|
||||
<Text style={styles.headerTitle}> </Text>
|
||||
<Image
|
||||
source={require('@/assets/images/icon.png')}
|
||||
style={styles.logo}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
</View>
|
||||
<FullScreenError message={error} onRetry={handleRefresh} />
|
||||
</SafeAreaView>
|
||||
@ -56,9 +60,11 @@ export default function DashboardScreen() {
|
||||
<Ionicons name="arrow-back" size={24} color={AppColors.textPrimary} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
<Text style={[styles.headerTitle, canGoBack && styles.headerTitleWithBack]}>
|
||||
{/* Empty title - WebView has its own dashboard header */}
|
||||
</Text>
|
||||
<Image
|
||||
source={require('@/assets/images/icon.png')}
|
||||
style={styles.logo}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
<TouchableOpacity style={styles.refreshButton} onPress={handleRefresh}>
|
||||
<Ionicons name="refresh" size={22} color={AppColors.primary} />
|
||||
</TouchableOpacity>
|
||||
@ -116,17 +122,14 @@ const styles = StyleSheet.create({
|
||||
padding: Spacing.xs,
|
||||
marginRight: Spacing.sm,
|
||||
},
|
||||
headerTitle: {
|
||||
flex: 1,
|
||||
fontSize: FontSizes.xl,
|
||||
fontWeight: '700',
|
||||
color: AppColors.textPrimary,
|
||||
},
|
||||
headerTitleWithBack: {
|
||||
marginLeft: 0,
|
||||
logo: {
|
||||
width: 36,
|
||||
height: 36,
|
||||
marginHorizontal: Spacing.md,
|
||||
},
|
||||
refreshButton: {
|
||||
padding: Spacing.xs,
|
||||
marginLeft: 'auto',
|
||||
},
|
||||
webViewContainer: {
|
||||
flex: 1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user