From 5ad38c8a8c065876d1c7e16cbc762776ba1a0c4e Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 23 May 2026 17:11:51 +0200 Subject: [PATCH] Replace loading indicator with `ProfileGridSkeleton` for profiles and add reusable skeleton component --- web/components/profile-grid.tsx | 39 +++++++++++++++++++++++ web/components/profiles/profiles-home.tsx | 5 ++- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/web/components/profile-grid.tsx b/web/components/profile-grid.tsx index 8faa232c..9933bb8d 100644 --- a/web/components/profile-grid.tsx +++ b/web/components/profile-grid.tsx @@ -41,6 +41,45 @@ import {capitalizePure} from 'web/lib/util/time' import {Col} from './layout/col' +export function ProfileGridSkeleton(props: {count?: number; className?: string}) { + const {count = 6, className} = props + return ( +
+ {Array.from({length: count}).map((_, i) => ( +
+
+
+ {/* name */} +
+ {/* age / location */} +
+ {/* headline */} +
+ {/* keyword pills */} +
+
+
+
+
+ {/* bio lines */} +
+
+
+
+
+
+ {/* photo placeholder */} +
+
+
+ ))} +
+ ) +} + export const ProfileGrid = (props: { profiles: Profile[] loadMore: () => Promise diff --git a/web/components/profiles/profiles-home.tsx b/web/components/profiles/profiles-home.tsx index e38a71a4..84906270 100644 --- a/web/components/profiles/profiles-home.tsx +++ b/web/components/profiles/profiles-home.tsx @@ -11,8 +11,7 @@ import {Search} from 'web/components/filters/search' import {useFilters} from 'web/components/filters/use-filters' import {Col} from 'web/components/layout/col' import {Row} from 'web/components/layout/row' -import {ProfileGrid} from 'web/components/profile-grid' -import {CompassLoadingIndicator} from 'web/components/widgets/loading-indicator' +import {ProfileGrid, ProfileGridSkeleton} from 'web/components/profile-grid' import {Title} from 'web/components/widgets/title' import {useBookmarkedSearches} from 'web/hooks/use-bookmarked-searches' import {useDisplayOptions} from 'web/hooks/use-display-options' @@ -329,7 +328,7 @@ export function ProfilesHome() { filtersElement={filtersElement} /> {displayProfiles === undefined || compatibleProfiles === undefined ? ( - + ) : ( <> {fromSignup && isClearedFilters && (