diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index 0343a8f0..7a71e3f1 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -148,6 +148,8 @@ interface ProfileCardProps { onRemoveAvatar?: () => void; /** Called when user removes their banner image. */ onRemoveBanner?: () => void; + /** Show the banner area (default true). When false, only the avatar shows. */ + showBanner?: boolean; /** Show NIP-05 row (default true) */ showNip05?: boolean; /** Show NIP-58 badge showcase row (default true). */ @@ -156,8 +158,9 @@ interface ProfileCardProps { * Which kind-0 field the editable text slot below the name edits. * - `'about'` (default): the bio textarea. * - `'website'`: a single-line website input, replacing the bio entirely. + * - `'none'`: hide the slot entirely (just name). */ - bioField?: 'about' | 'website'; + bioField?: 'about' | 'website' | 'none'; /** Placeholder for the bio textarea when `bioField` is `'about'`. */ aboutPlaceholder?: string; /** When provided, render an editable profile fields section below bio */ @@ -174,6 +177,7 @@ export function ProfileCard({ onPasteUrl, onRemoveAvatar, onRemoveBanner, + showBanner = true, showNip05 = true, showBadges = true, bioField = 'about', @@ -209,7 +213,7 @@ export function ProfileCard({
{/* Banner */} - {editable && (onPasteUrl || onRemoveBanner) ? ( + {showBanner && (editable && (onPasteUrl || onRemoveBanner) ? ( // When a paste or remove action exists, the banner opens the shared // image menu instead of going straight to the file picker. )}
- )} + ))} {/* Profile info */}
{/* Avatar */} -
+
{editable ? ( {bioField === 'website' ? ( editable ? ( @@ -395,6 +400,7 @@ export function ProfileCard({

) : null}
+ )} {/* Extra profile fields — collapsible, only when prop provided */} {extraFields !== undefined && ( diff --git a/src/components/onboarding/ProfileIdentityEditor.tsx b/src/components/onboarding/ProfileIdentityEditor.tsx index b80f24f4..40b55804 100644 --- a/src/components/onboarding/ProfileIdentityEditor.tsx +++ b/src/components/onboarding/ProfileIdentityEditor.tsx @@ -40,11 +40,14 @@ interface ProfileIdentityEditorProps { onChange: (patch: Partial) => void; /** * Which kind-0 field the editable text slot below the name edits: - * `'website'` for organizations, `'about'` (bio) for campaigners. + * `'website'` for organizations, `'about'` (bio) for campaigners, or + * `'none'` to show just the name. */ - bioField: 'website' | 'about'; + bioField: 'website' | 'about' | 'none'; /** Placeholder for the bio textarea when `bioField` is `'about'`. */ aboutPlaceholder?: string; + /** Show the banner area (default true). */ + showBanner?: boolean; /** Notifies the host of upload progress so it can gate its primary button. */ onUploadingChange?: (uploading: boolean) => void; className?: string; @@ -65,6 +68,7 @@ export function ProfileIdentityEditor({ onChange, bioField, aboutPlaceholder, + showBanner = true, onUploadingChange, className, }: ProfileIdentityEditorProps) { @@ -245,6 +249,7 @@ export function ProfileIdentityEditor({ onRemoveBanner={() => onChange({ banner: '' })} bioField={bioField} aboutPlaceholder={aboutPlaceholder} + showBanner={showBanner} showNip05={false} showBadges={false} /> diff --git a/src/pages/CreateCampaignPage.tsx b/src/pages/CreateCampaignPage.tsx index a61ae9fb..4ecd7a39 100644 --- a/src/pages/CreateCampaignPage.tsx +++ b/src/pages/CreateCampaignPage.tsx @@ -761,8 +761,8 @@ export function CreateCampaignPage() { )} draft={profileData} onChange={(patch) => setProfileData((prev) => ({ ...prev, ...patch }))} - bioField="about" - aboutPlaceholder={t('onboarding.profile.aboutPlaceholder')} + bioField="none" + showBanner={false} onUploadingChange={setProfileImageUploading} /> );