Remove h2 displaying truncated public key from presentation form header
This commit is contained in:
parent
107571c378
commit
e5a95bc627
@ -167,7 +167,6 @@ function PresentationForm({
|
|||||||
error,
|
error,
|
||||||
loading,
|
loading,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
userName,
|
|
||||||
}: {
|
}: {
|
||||||
draft: AuthorPresentationDraft
|
draft: AuthorPresentationDraft
|
||||||
setDraft: (next: AuthorPresentationDraft) => void
|
setDraft: (next: AuthorPresentationDraft) => void
|
||||||
@ -175,7 +174,6 @@ function PresentationForm({
|
|||||||
error: string | null
|
error: string | null
|
||||||
loading: boolean
|
loading: boolean
|
||||||
handleSubmit: (e: FormEvent<HTMLFormElement>) => Promise<void>
|
handleSubmit: (e: FormEvent<HTMLFormElement>) => Promise<void>
|
||||||
userName: string
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
@ -184,7 +182,7 @@ function PresentationForm({
|
|||||||
}}
|
}}
|
||||||
className="border border-neon-cyan/20 rounded-lg p-6 bg-cyber-dark space-y-4"
|
className="border border-neon-cyan/20 rounded-lg p-6 bg-cyber-dark space-y-4"
|
||||||
>
|
>
|
||||||
<PresentationFormHeader userName={userName} />
|
<PresentationFormHeader />
|
||||||
<PresentationFields draft={draft} onChange={setDraft} />
|
<PresentationFields draft={draft} onChange={setDraft} />
|
||||||
<ValidationError message={validationError ?? error} />
|
<ValidationError message={validationError ?? error} />
|
||||||
<ArticleFormButtons loading={loading} />
|
<ArticleFormButtons loading={loading} />
|
||||||
@ -349,9 +347,6 @@ function AuthorPresentationFormView({
|
|||||||
return <SuccessNotice />
|
return <SuccessNotice />
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get user name or fallback to shortened pubkey
|
|
||||||
const userName = profile?.name ?? (pubkey ? `${pubkey.substring(0, 16)}...` : t('presentation.fallback.user'))
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PresentationForm
|
<PresentationForm
|
||||||
draft={state.draft}
|
draft={state.draft}
|
||||||
@ -360,7 +355,6 @@ function AuthorPresentationFormView({
|
|||||||
error={state.error}
|
error={state.error}
|
||||||
loading={state.loading}
|
loading={state.loading}
|
||||||
handleSubmit={state.handleSubmit}
|
handleSubmit={state.handleSubmit}
|
||||||
userName={userName}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +1,8 @@
|
|||||||
import { t } from '@/lib/i18n'
|
import { t } from '@/lib/i18n'
|
||||||
|
|
||||||
interface PresentationFormHeaderProps {
|
export function PresentationFormHeader() {
|
||||||
userName: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export function PresentationFormHeader({ userName }: PresentationFormHeaderProps) {
|
|
||||||
return (
|
return (
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<h2 className="text-2xl font-bold mb-2 text-neon-cyan font-mono">
|
|
||||||
{userName}
|
|
||||||
</h2>
|
|
||||||
<p className="text-cyber-accent text-sm mb-2">
|
<p className="text-cyber-accent text-sm mb-2">
|
||||||
{t('presentation.description')}
|
{t('presentation.description')}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user