frontend: rig new triggers screen

Pedro Lucas Porcellis porcellis@eletrotupi.com 14 days ago da58efba46e647a5b167032232fc6bd69007195d
Parents: 88aa4c0
2 file(s) changed
  • frontend/app/(tabs)/actions.tsx +5 -1
  • frontend/app/_layout.tsx +7 -0
frontend/app/(tabs)/actions.tsx
@@ -18,6 +18,10 @@ const onPressSleep = () => {
18 18 router.push('/sleep/new')
19 19 }
20 20
21 + const onPressTrigger = () => {
22 + router.push('/triggers/new')
23 + }
24 +
21 25 return (
22 26 <ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
23 27 onNotificationPress={() => console.log('Notifications')}
@@ -63,7 +67,7 @@ Informe duração e qualidade do sono.
63 67 </Text>
64 68 </Card>
65 69
66 - <Card style={{ padding: Spacing.cardGap }}>
70 + <Card style={{ padding: Spacing.cardGap }} onPress={onPressTrigger}>
67 71 <View style={[styles.cardIcon, { backgroundColor: '#FFF7ED' }]}>
68 72 <Ionicons name="flash-outline" size={20} color="#EA580C" />
69 73 </View>
frontend/app/_layout.tsx
@@ -52,6 +52,13 @@ title: "Registrar Sono"
52 52 }}
53 53 />
54 54
55 + <Stack.Screen
56 + name="triggers/new"
57 + options={{
58 + title: "Registrar Gatilho"
59 + }}
60 + />
61 +
55 62 <Stack.Screen name="modal" options={{ presentation: 'modal', title: 'Modal' }} />
56 63 </Stack>
57 64 </AuthProvider>