Wavelength/app/(tabs)/index.tsx

37 lines
1007 B
TypeScript
Raw Normal View History

2024-10-11 13:46:46 -05:00
import React, { useState } from "react";
import { StyleSheet } from "react-native";
2024-10-08 16:58:50 -05:00
import { ThemedView } from "@/components/ThemedView";
2024-10-11 13:46:46 -05:00
import UserInfo from "@/components/home/UserInfo";
import Relationships from "@/components/home/Relationships";
2024-10-08 16:58:50 -05:00
const Index = () => {
2024-10-11 13:46:46 -05:00
const [profilePictureUrl, setProfilePictureUrl] = useState<string | null>(null);
2024-10-11 13:46:46 -05:00
const handleProfilePictureUpdate = (newUrl: string) => {
setProfilePictureUrl(newUrl);
};
return (
2024-10-08 16:58:50 -05:00
<ThemedView style={styles.container}>
2024-10-11 13:46:46 -05:00
<UserInfo onProfilePictureUpdate={handleProfilePictureUpdate} />
<Relationships profilePictureUrl={profilePictureUrl} />
2024-10-08 16:58:50 -05:00
<ThemedView style={styles.footerContainer}>
2024-10-10 13:02:09 -05:00
{/* Add your relationship request button or other components here */}
</ThemedView>
2024-10-08 16:58:50 -05:00
</ThemedView>
);
}
2024-10-10 13:02:09 -05:00
2024-10-08 16:58:50 -05:00
export default Index;
const styles = StyleSheet.create({
2024-10-08 16:58:50 -05:00
container: {
flex: 1,
alignItems: 'center',
},
2024-10-08 16:58:50 -05:00
footerContainer: {
flex: 1 / 3,
alignItems: 'center',
},
});