Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,16 @@
padding: $sp-4 $sp-4 $sp-4 0;
}
}

.titleWrap {
margin-top: $sp-8;
}

.email {
display: flex;
align-items: center;
}

.emailText {
margin-top: $sp-2;
}
13 changes: 13 additions & 0 deletions src/apps/profiles/src/member-profile/about-me/AboutMe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { KeyedMutator } from 'swr'
import classNames from 'classnames'

import { NamesAndHandleAppearance, useMemberTraits, UserProfile, UserTraitIds, UserTraits } from '~/libs/core'
import { CopyButton } from '~/apps/admin/src/lib/components/CopyButton'

import { AddButton, EditMemberPropertyBtn, EmptySection } from '../../components'
import { EDIT_MODE_QUERY_PARAM, profileEditModes } from '../../config'
Expand Down Expand Up @@ -119,6 +120,18 @@ const AboutMe: FC<AboutMeProps> = (props: AboutMeProps) => {
/>
)
}

{props.profile?.email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Consider adding a check to ensure props.profile.email is a valid email format before rendering it. This can prevent potential display issues or errors if the email data is malformed.

&& (
<div className={styles.titleWrap}>
<p className='body-main-bold'>Contact</p>
<div className={styles.email}>
<p className={styles.emailText}>{props.profile.email}</p>
<CopyButton className={styles.copyButton} text={props.profile.email} />
</div>
</div>
)}

</div>
)
}
Expand Down
Loading