From 7a184cdf99b1a929db9c65760b614066b5f1806e Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 11 May 2026 12:30:36 +0200 Subject: [PATCH] Refactor `profile-info.tsx`: remove unused props and imports, adjust conditional rendering, and streamline sign-up button text. --- web/components/profile/profile-info.tsx | 30 +++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/web/components/profile/profile-info.tsx b/web/components/profile/profile-info.tsx index 4e0e3249..610c3f61 100644 --- a/web/components/profile/profile-info.tsx +++ b/web/components/profile/profile-info.tsx @@ -1,4 +1,3 @@ -import {JSONContent} from '@tiptap/core' import clsx from 'clsx' import {debug} from 'common/logger' import {Profile} from 'common/profiles/profile' @@ -18,7 +17,6 @@ import ProfileAbout, { } from 'web/components/profile-about' import ProfileCarousel from 'web/components/profile-carousel' import {ProfileCommentSection} from 'web/components/profile-comment-section' -import {Content} from 'web/components/widgets/editor' import {Subtitle} from 'web/components/widgets/subtitle' import {shortenName} from 'web/components/widgets/user-link' import {useGetter} from 'web/hooks/use-getter' @@ -161,7 +159,6 @@ export function ProfileInfo(props: { refreshProfile={refreshProfile} fromProfilePage={fromProfilePage} fromSignup={fromSignup} - isProfileVisible={isProfileVisible} // likesGiven={likesGiven ?? []} // likesReceived={likesReceived ?? []} // ships={ships ?? []} @@ -169,9 +166,9 @@ export function ProfileInfo(props: { /> ) : ( -
- -
+ {/*
*/} + {/* */} + {/*
*/}
@@ -180,7 +177,10 @@ export function ProfileInfo(props: { @@ -253,7 +253,6 @@ function ProfileContent(props: { refreshProfile: () => void fromProfilePage?: Profile fromSignup?: boolean - isProfileVisible?: true | User // likesGiven: LikeData[] // likesReceived: LikeData[] // ships: ShipData[] @@ -266,7 +265,6 @@ function ProfileContent(props: { refreshProfile, fromProfilePage, fromSignup, - // isProfileVisible, // likesGiven, // likesReceived, // ships, @@ -322,11 +320,7 @@ function ProfileContent(props: { )} - {currentUser && ( - // - - // - )} + {currentUser && ( )} + {!currentUser && ( + + )}
{/*