Skip to content

Commit 4d37188

Browse files
chore(mobile): align Expo packages and strict typings
1 parent 4ea66a9 commit 4d37188

6 files changed

Lines changed: 371 additions & 669 deletions

File tree

apps/mobile/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ if (sentryDsn) {
3131
Notifications.setNotificationHandler({
3232
handleNotification: async () => ({
3333
shouldShowAlert: true,
34+
shouldShowBanner: true,
35+
shouldShowList: true,
3436
shouldPlaySound: false,
3537
shouldSetBadge: false,
3638
}),
@@ -142,3 +144,4 @@ export default function App() {
142144
);
143145
}
144146

147+

apps/mobile/app/components/ui/Button.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StyleSheet, TouchableOpacity, ViewStyle } from 'react-native';
2+
import { StyleProp, StyleSheet, TouchableOpacity, View, ViewStyle } from 'react-native';
33
import { Text } from 'react-native-paper';
44
import { LinearGradient } from 'expo-linear-gradient';
55
import Animated, { useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
@@ -10,13 +10,13 @@ interface ButtonProps {
1010
children: React.ReactNode;
1111
onPress: () => void;
1212
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
13-
style?: ViewStyle;
13+
style?: StyleProp<ViewStyle>;
1414
loading?: boolean;
1515
}
1616

1717
export function Button({ children, onPress, variant = 'primary', style, loading }: ButtonProps) {
1818
const theme = useAppTheme();
19-
const { colors, shadows, isDark } = theme;
19+
const { colors, shadows } = theme;
2020
const scale = useSharedValue(1);
2121

2222
const animatedStyle = useAnimatedStyle(() => ({
@@ -71,10 +71,7 @@ export function Button({ children, onPress, variant = 'primary', style, loading
7171
animatedStyle,
7272
]}
7373
>
74-
<Text style={[styles.text, { color: v.text }]}>
75-
{children}
76-
</Text>
77-
{/* Inset highlight for skeuomorphism */}
74+
<Text style={[styles.text, { color: v.text }]}>{loading ? 'Loading...' : children}</Text>
7875
<View style={[styles.highlight, { backgroundColor: colors.insetHighlight }]} />
7976
</Animated.View>
8077
);
@@ -90,6 +87,7 @@ export function Button({ children, onPress, variant = 'primary', style, loading
9087
scale.value = withSpring(1);
9188
}}
9289
style={[styles.wrapper, style]}
90+
disabled={loading}
9391
>
9492
{v.gradient ? (
9593
<LinearGradient
@@ -107,8 +105,6 @@ export function Button({ children, onPress, variant = 'primary', style, loading
107105
);
108106
}
109107

110-
import { View } from 'react-native';
111-
112108
const styles = StyleSheet.create({
113109
wrapper: {
114110
borderRadius: 16,
@@ -137,5 +133,5 @@ const styles = StyleSheet.create({
137133
right: 2,
138134
height: 1,
139135
borderRadius: 8,
140-
}
136+
},
141137
});

apps/mobile/app/components/ui/Card.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react';
2-
import { StyleSheet, View, ViewStyle } from 'react-native';
2+
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
33
import { useAppTheme } from '../../theme/useAppTheme';
44
import { spacing } from '../../theme/spacing';
55

66
interface CardProps {
77
children: React.ReactNode;
8-
style?: ViewStyle;
8+
style?: StyleProp<ViewStyle>;
99
variant?: 'default' | 'elevated' | 'glass';
1010
}
1111

@@ -74,3 +74,4 @@ const styles = StyleSheet.create({
7474
opacity: 0.2,
7575
}
7676
});
77+

apps/mobile/app/theme/colors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const colors = {
4949
insetHighlight: 'rgba(255,255,255,0.6)',
5050

5151
// Gradients
52-
gradient: ['#6D28D9', '#8B5CF6'],
52+
gradient: ['#6D28D9', '#8B5CF6'] as const,
5353
},
5454
dark: {
5555
// Brand Colors
@@ -91,6 +91,7 @@ export const colors = {
9191
insetHighlight: 'rgba(255,255,255,0.05)',
9292

9393
// Gradients
94-
gradient: ['#7C3AED', '#A78BFA'],
94+
gradient: ['#7C3AED', '#A78BFA'] as const,
9595
},
9696
};
97+

apps/mobile/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"build": "tsc --noEmit",
99
"lint": "tsc --noEmit",
1010
"test": "jest --runInBand --passWithNoTests",
11-
"eas:build": "eas build -p android --profile production"
11+
"eas:build": "eas build -p android --profile production"
1212
},
1313
"dependencies": {
14-
"@expo/vector-icons": "^14.1.0",
14+
"@expo/vector-icons": "^15.0.3",
1515
"@fairshare/shared-types": "workspace:*",
1616
"@react-native-community/netinfo": "^11.4.1",
1717
"@react-navigation/bottom-tabs": "^7.4.7",
@@ -20,15 +20,15 @@
2020
"axios": "^1.8.2",
2121
"expo": "^54.0.33",
2222
"expo-constants": "~18.0.10",
23-
"expo-haptics": "~14.0.1",
24-
"expo-linear-gradient": "~14.1.5",
23+
"expo-haptics": "~15.0.8",
24+
"expo-linear-gradient": "~15.0.8",
2525
"expo-secure-store": "^15.0.8",
2626
"expo-status-bar": "~3.0.9",
27-
"lottie-react-native": "~7.2.2",
27+
"lottie-react-native": "~7.3.1",
2828
"react": "19.1.0",
2929
"react-dom": "19.1.0",
3030
"react-hook-form": "^7.55.0",
31-
"react-native": "0.81.4",
31+
"react-native": "0.81.5",
3232
"react-native-gesture-handler": "~2.28.0",
3333
"react-native-paper": "^5.14.5",
3434
"react-native-reanimated": "~4.1.1",
@@ -38,15 +38,15 @@
3838
"react-native-screens": "^4.16.0",
3939
"socket.io-client": "^4.8.1",
4040
"zustand": "^5.0.3",
41-
"expo-notifications": "~0.29.14",
42-
"expo-image": "~2.4.0",
43-
"sentry-expo": "^7.2.0",
41+
"expo-notifications": "~0.32.16",
42+
"expo-image": "~3.0.11",
43+
"sentry-expo": "~7.0.0",
4444
"react-native-skeleton-placeholder": "^5.2.4"
4545
},
4646
"devDependencies": {
4747
"@testing-library/react-native": "^13.3.3",
4848
"@types/jest": "^29.5.12",
49-
"@types/react": "^19.0.7",
49+
"@types/react": "~19.1.10",
5050
"jest": "^29.7.0",
5151
"jest-expo": "~54.0.11",
5252
"react-test-renderer": "19.1.0",

0 commit comments

Comments
 (0)