From 821d280f5cbcff61aad47cb6ee9bef723b73386a Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 1 Dec 2025 16:09:35 +0100 Subject: [PATCH] Refresh profile pics and make them square --- web/components/profile-carousel.tsx | 28 +++++++++++-------- web/components/profile/profile-info.tsx | 2 +- .../widgets/editable-photo-grid.tsx | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/web/components/profile-carousel.tsx b/web/components/profile-carousel.tsx index 83eec333..8409931d 100644 --- a/web/components/profile-carousel.tsx +++ b/web/components/profile-carousel.tsx @@ -15,8 +15,11 @@ import {PlusIcon} from '@heroicons/react/solid' import {EditablePhotoGrid} from './widgets/editable-photo-grid' import {AddPhotosWidget} from './widgets/add-photos' -export default function ProfileCarousel(props: { profile: Profile }) { - const {profile} = props +export default function ProfileCarousel(props: { + profile: Profile, + refreshProfile: () => void, +}) { + const {profile, refreshProfile} = props const photoNums = profile.photo_urls ? profile.photo_urls.length : 0 const [lightboxUrl, setLightboxUrl] = useState('') @@ -36,19 +39,20 @@ export default function ProfileCarousel(props: { profile: Profile }) { photo_urls: photoUrls, }) setIsEditMode(false) + refreshProfile() } if (!currentUser && profile.visibility !== 'public') { return ( {profile.pinned_url && ( -
+
@@ -56,7 +60,7 @@ export default function ProfileCarousel(props: { profile: Profile }) { )} {photoNums > 0 && ( + className="bg-canvas-100 dark:bg-canvas-0 text-ink-500 relative h-[300px] w-[300px] flex-none items-center rounded text-6xl ">
+{photoNums}
{buildArray(profile.pinned_url, profile.photo_urls).map((url, i) => ( -
+
{ @@ -167,7 +171,7 @@ export default function ProfileCarousel(props: { profile: Profile }) { ))} {isCurrentUser && (profile.photo_urls?.length ?? 0) > 1 && (