From 6f412e60bf1966a4f157fb934d06fc5102b65f4b Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Thu, 28 May 2026 17:19:00 +0200 Subject: [PATCH] Add loading profile skeleton --- android/app/build.gradle | 4 +- web/components/profile/profile-info.tsx | 54 +++++++++++++++++++++++++ web/pages/[username]/index.tsx | 9 ++--- 3 files changed, 60 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 62d9118f..90877c0d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.compassconnections.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 113 - versionName "1.27.0" + versionCode 114 + versionName "1.28.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/web/components/profile/profile-info.tsx b/web/components/profile/profile-info.tsx index e4e903ef..b67d7573 100644 --- a/web/components/profile/profile-info.tsx +++ b/web/components/profile/profile-info.tsx @@ -207,6 +207,60 @@ export function ProfileInfo(props: { ) } +export function ProfileInfoSkeleton() { + return ( + <> +
+
+ +
+
+ +
+ +
+ +
+
+
+ + + + +
+
+
+
+ + +
+
+ + {[...Array(6)].map((_, i) => ( + +
+ +
+
+ + + ))} + +
+
+ + ) +} + function ProfileCard(props: {title?: ReactNode; children: ReactNode; className?: string}) { const {title, children, className} = props // Check if children is null or undefined diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index db140ffc..74fecc3c 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -11,9 +11,8 @@ import {useRouter} from 'next/router' import {useEffect, useMemo, useState} from 'react' import {Col} from 'web/components/layout/col' import {PageBase} from 'web/components/page-base' -import {ProfileInfo} from 'web/components/profile/profile-info' +import {ProfileInfo, ProfileInfoSkeleton} from 'web/components/profile/profile-info' import {SEO} from 'web/components/SEO' -import {CompassLoadingIndicator} from 'web/components/widgets/loading-indicator' import {useProfileByUser} from 'web/hooks/use-profile' import {useSaveReferral} from 'web/hooks/use-save-referral' import {useTracking} from 'web/hooks/use-tracking' @@ -219,8 +218,8 @@ export default function UserPage(props: UserPageProps) { if (loading) { return ( - - + + ) } @@ -324,7 +323,7 @@ function UserPageInner(props: ActiveUserPageProps) { fromSignup={fromSignup} /> ) : ( - + )} )}