diff --git a/app/(app)/(tabs)/tags.tsx b/app/(app)/(tabs)/tags.tsx index bb6ef86..564ce37 100644 --- a/app/(app)/(tabs)/tags.tsx +++ b/app/(app)/(tabs)/tags.tsx @@ -22,6 +22,7 @@ export default function TagsScreen() { const renderItem = useCallback(({ item }: { item: ITag }) => { return ( }> state.user); @@ -18,10 +19,12 @@ export default function ProfileSettingsPage() { }); return ( - }> - - - + }> + + + + + ); diff --git a/app/_layout.tsx b/app/_layout.tsx index 9238f7c..91e8b9c 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -32,13 +32,13 @@ export default function RootLayout() { }, [isInitialized]); useEffect(() => { - if ((interLoaded || interError) && isInitialized) { + if ((interLoaded && !interError) || isInitialized) { // Hide the splash screen after the fonts have loaded (or an error was returned) and the UI is ready. SplashScreen.hideAsync(); } }, [interLoaded, interError, isInitialized]); - if (!interLoaded && !interError && !isInitialized) { + if (!interLoaded || interError || !isInitialized) { return null; } diff --git a/lib/components/app_loading.tsx b/lib/components/app_loading.tsx new file mode 100644 index 0000000..a15ae15 --- /dev/null +++ b/lib/components/app_loading.tsx @@ -0,0 +1,41 @@ +import { useEffect } from 'react'; +import { Modal, StatusBar, View } from 'react-native'; +import { Spinner, Text, YStack } from 'tamagui'; + +const bgColor = 'rgba(0,0,0,0.6)'; + +export default function AppLoading() { + useEffect(() => { + const entry = { + backgroundColor: bgColor, + animated: true + }; + StatusBar.pushStackEntry(entry); + + return () => { + StatusBar.popStackEntry(entry); + }; + }, []); + + return ( + + + + + Laddar.. + + + + ); +} diff --git a/lib/components/profile_view.tsx b/lib/components/profile_view.tsx index e583490..ce647f3 100644 --- a/lib/components/profile_view.tsx +++ b/lib/components/profile_view.tsx @@ -11,6 +11,7 @@ import { H2, Image, ListItem, + ScrollView, Separator, Text, View, @@ -41,133 +42,137 @@ export default function ProfileView({ socialData }: IProps) { return ( - + - - {profileData.profileImageUrl ? ( - <> - + + {profileData.profileImageUrl ? ( + <> + - - - - - ) : ( - + + + + + ) : ( + + )} + +

{`${profileData.firstName} ${profileData.lastName}`}

+ {profileData.bio} +
+ + {showSendMessageBtn && + profileData?.sendMessageAllowed && + isSignedIn && ( + )} - -

{`${profileData.firstName} ${profileData.lastName}`}

- {profileData.bio} -
- {showSendMessageBtn && profileData?.sendMessageAllowed && isSignedIn && ( - - )} - - - {bioText} - - {bioContent} - - - - - - {(socialData || phoneData) && ( + {bioText} + + {bioContent} + + - } + + + {(socialData || phoneData) && ( + - {phoneData && ( - - - } - alignItems="center" - onPress={() => null} - title="Mobil" - subTitle={phoneData.number} - /> - - - )} + } + > + {phoneData && ( + + + } + alignItems="center" + onPress={() => null} + title="Mobil" + subTitle={phoneData.number} + /> + + + )} - {socialData?.twitter && ( - - - } - alignItems="center" - onPress={() => null} - title="Twitter" - subTitle={socialData?.twitter} - /> - - - )} - - - )} - + {socialData?.twitter && ( + + + } + alignItems="center" + onPress={() => null} + title="Twitter" + subTitle={socialData?.twitter} + /> + + + )} + + + )} + + ); } diff --git a/lib/components/tags/tag_card.component.tsx b/lib/components/tags/tag_card.component.tsx index 05c1dc0..938f7eb 100644 --- a/lib/components/tags/tag_card.component.tsx +++ b/lib/components/tags/tag_card.component.tsx @@ -24,6 +24,7 @@ export default function TagCard({ created_at, isActive, name, note }: IProps) { animation="bouncy" hoverStyle={{ scale: 0.98 }} pressStyle={{ scale: 0.98 }} + w="100%" >