diff --git a/web/components/profile/profile-info.tsx b/web/components/profile/profile-info.tsx index 5d44e9cf..3cb447a1 100644 --- a/web/components/profile/profile-info.tsx +++ b/web/components/profile/profile-info.tsx @@ -1,8 +1,10 @@ import {JSONContent} from '@tiptap/core' +import clsx from 'clsx' import {debug} from 'common/logger' import {Profile} from 'common/profiles/profile' import {UserActivity} from 'common/user' import Image from 'next/image' +import React, {ReactNode} from 'react' import {ProfileAnswers} from 'web/components/answers/profile-answers' import {ProfileBio} from 'web/components/bio/profile-bio' import {Col} from 'web/components/layout/col' @@ -73,62 +75,66 @@ export function ProfileInfo(props: { return ( <> - - {profile.pinned_url && ( -
- + + {profile.pinned_url && ( +
+ +
+ )} +
+
- )} - -
- {isProfileVisible ? ( - - ) : ( - -
- -
- -
-
-
-
+ + {isProfileVisible ? ( + + ) : ( + +
+ +
+ +
+
+
+
+ + + + - - - - - )} + )} +
{/*{areCompatible &&*/} {/* ((!fromProfilePage && !isCurrentUser) ||*/} {/* (fromProfilePage && fromProfilePage.user_id === currentUser?.id)) && (*/} @@ -152,6 +158,25 @@ export function ProfileInfo(props: { ) } +function ProfileCard(props: {title?: ReactNode; children: ReactNode; className?: string}) { + const {title, children, className} = props + return ( +
+ {title != null && {title}} + {children} +
+ ) +} + +function CardTitle(props: {children: ReactNode; className?: string}) { + const {children, className} = props + return ( +
+ {children} +
+ ) +} + function ProfileContent(props: { user: User userActivity?: UserActivity @@ -184,31 +209,63 @@ function ProfileContent(props: { return ( <> -
- + +
+ +
+
+ +
+ + + + + + + + + + + + {isProfileVisible && ( + + + + )} + + + + + + + + + + + + +
- - - {isProfileVisible && } - - - {/*