frontend: connect new sleep record screen
Parents:
422fb6f1 file(s) changed
- frontend/app/(tabs)/actions.tsx +7 -2
frontend/app/(tabs)/actions.tsx
@@ -9,10 +9,14 @@ import { Grid, Col, Row, Between } from '@/components/ui/LayoutHelpers';
9 9 import { Button } from '@/components/ui/Button'
10 10 import { Shadows, Colors, Typography, Spacing, BorderRadius } from '@/constants/theme';
11 11 import { Ionicons, Octicons } from '@expo/vector-icons';
12 - import { Link } from 'expo-router';
12 + import { Link, router } from 'expo-router';
13 13
14 14 export default function Actions() {
15 15 const { user } = useAuth();
16 +
17 + const onPressSleep = () => {
18 + router.push('/sleep/new')
19 + }
16 20
17 21 return (
18 22 <ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
@@ -45,7 +49,7 @@ </Text>
45 49 </Card>
46 50
47 51 <Grid gap={4}>
48 - <Card style={{ padding: Spacing.cardGap }}>
52 + <Card onPress={onPressSleep} style={{ padding: Spacing.cardGap }}>
49 53 <View style={[styles.cardIcon, { backgroundColor: '#EFF6FF' }]}>
50 54 <Ionicons name="moon-outline" size={20} color="#2563EB" />
51 55 </View>
@@ -127,6 +131,7 @@ marginTop: 4
127 131 },
128 132 disclaimerCard: {
129 133 padding: Spacing.cardGap,
134 + marginTop: 20
130 135 },
131 136 disclaimerTitleContainer: {
132 137 flex: 1,