frontend: fix routes & fix default mood selector
Parents:
201b6a43 file(s) changed
- frontend/app/(tabs)/new/index.tsx +1 -1
- frontend/app/_layout.tsx +1 -1
- frontend/app/auth/login.tsx +1 -1
frontend/app/(tabs)/new/index.tsx
@@ -18,7 +18,7 @@ import { router } from 'expo-router';
18 18
19 19 export default function New() {
20 20 const { user } = useAuth();
21 - const [mood, setMood] = useState<string>('bem');
21 + const [mood, setMood] = useState<string>('good');
22 22 const [isLoading, setIsLoading] = useState<boolean>(false);
23 23
24 24 // TODO: Move these elsewhere
frontend/app/_layout.tsx
@@ -5,7 +5,7 @@
5 5 import { AuthProvider } from '@/context/AuthContext';
6 6
7 7 export const unstable_settings = {
8 - anchor: '(tabs)',
8 + anchor: '(tabs)/new',
9 9 };
10 10
11 11 export default function RootLayout() {
frontend/app/auth/login.tsx
@@ -47,7 +47,7 @@ if (!validateForm()) return;
47 47
48 48 try {
49 49 await login(email, password);
50 - router.replace('/(tabs)');
50 + router.replace('/(tabs)/new');
51 51 } catch (error: any) {
52 52 Alert.alert('Erro: ', 'Falha ao fazer login');
53 53 }