Skip to content

Commit 09618cd

Browse files
feat: add Activity screen and establish core application navigation structure.
1 parent 398bc0e commit 09618cd

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

apps/mobile/app/navigation/AppNavigator.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ function MainTabs() {
8080
Activity: 'history',
8181
Profile: 'account-circle',
8282
};
83-
return <MaterialCommunityIcons name={iconByRoute[route.name]} size={size} color={color} />;
83+
const iconName = iconByRoute[route.name] || 'information';
84+
return <MaterialCommunityIcons name={iconName} size={size} color={color} />;
8485
},
8586
})}
8687
>

apps/mobile/app/screens/ActivityScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function ActivityScreen({ route }: { route?: { params?: { groupId?: strin
140140
accessibilityLabel={actionText(item)}
141141
>
142142
<View style={[styles.iconBg, { backgroundColor: `${iconColor}18` }]}>
143-
<MaterialCommunityIcons name={iconByType[item.type]} size={20} color={iconColor} />
143+
<MaterialCommunityIcons name={iconByType[item.type] || 'information-outline'} size={20} color={iconColor} />
144144
</View>
145145
<View style={styles.content}>
146146
<Text style={[styles.title, { color: colors.text_primary }]} numberOfLines={1}>
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import React from 'react';
22
import { useColorScheme } from 'react-native';
33
import { colors } from './colors';
4+
import { typography } from './typography';
5+
import { spacing } from './spacing';
6+
import { lightTheme, darkTheme } from './theme';
47
import { useThemeStore } from '../store/themeStore';
58

69
export type ThemeColors = typeof colors.light;
10+
export type ThemeTypography = typeof typography;
11+
export type ThemeSpacing = typeof spacing;
12+
export type ThemeShadows = typeof lightTheme.shadows;
713

8-
export function useAppTheme(): { isDark: boolean; colors: ThemeColors } {
14+
export function useAppTheme() {
915
const systemColorScheme = useColorScheme();
1016
const themeMode = useThemeStore((state) => state.themeMode);
1117

@@ -14,8 +20,13 @@ export function useAppTheme(): { isDark: boolean; colors: ThemeColors } {
1420
return themeMode === 'dark';
1521
}, [themeMode, systemColorScheme]);
1622

23+
const theme = isDark ? darkTheme : lightTheme;
24+
1725
return React.useMemo(() => ({
1826
isDark,
1927
colors: isDark ? colors.dark : colors.light,
20-
}), [isDark]);
28+
typography,
29+
spacing,
30+
shadows: theme.shadows,
31+
}), [isDark, theme.shadows]);
2132
}

0 commit comments

Comments
 (0)