Fixed initial errors
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user