Fixed initial errors

This commit is contained in:
2024-10-18 12:39:54 -05:00
parent 3eeffb789f
commit cc8e0c623c
10 changed files with 78 additions and 30 deletions

View File

@ -1,8 +1,8 @@
import React, { useState } from 'react';
import { StyleSheet } from 'react-native';
import { ThemedView } from '@/components/theme/Theme';
import { ThemedText, ThemedView } from '@/components/theme/Theme';
import UserInfo from '@/components/home/UserInfo';
import Relationship from '@/components/home/Relationship';
import RelationshipView from '@/components/home/RelationshipView';
const IndexScreen = () => {
const [pfpUrl, setPfpUrl] = useState<string | null>(null);
@ -12,11 +12,12 @@ const IndexScreen = () => {
return (
<ThemedView style={styles.container}>
<UserInfo onPfpUpdate={handlePfpUpdate} />
<Relationship pfpUrl={pfpUrl} />
<RelationshipView pfpUrl={pfpUrl} />
<ThemedView style={styles.footerContainer}>
</ThemedView>
</ThemedView>
);
};
export default IndexScreen;

View File

@ -5,11 +5,16 @@ import {
PushNotificationManager
} from "@/components/services/notifications/PushNotificationManager";
export default function RootLayout() {
const RootLayout = () => {
const [isSignedIn, setIsSignedIn] = useState(false);
if (!isSignedIn)
return (<SignInScreen onSignIn={() => setIsSignedIn(true)} />);
console.log('RootLayout rendering, isSignedIn:', isSignedIn);
if (!isSignedIn) {
console.log('Rendering SignInScreen');
return (
<SignInScreen onSignIn={() => setIsSignedIn(true)} />
);
}
console.log('PushNotificationManager & Stack');
return (
<PushNotificationManager>
<Stack>
@ -19,3 +24,4 @@ export default function RootLayout() {
</PushNotificationManager>
);
}
export default RootLayout;