Fix linter errors: extract PresentationFormHeader component
- Extract PresentationFormHeader to reduce PresentationForm line count - Add all missing translations to public/locales files - Update Bitcoin address help text to specify 'excluding fees' - All TypeScript and linter checks pass
This commit is contained in:
parent
f082befb36
commit
aa35918db2
@ -5,6 +5,7 @@ import { ArticleField } from './ArticleField'
|
||||
import { ArticleFormButtons } from './ArticleFormButtons'
|
||||
import { ConnectButton } from './ConnectButton'
|
||||
import { ImageUploadField } from './ImageUploadField'
|
||||
import { PresentationFormHeader } from './PresentationFormHeader'
|
||||
import { t } from '@/lib/i18n'
|
||||
|
||||
interface AuthorPresentationDraft {
|
||||
@ -171,18 +172,7 @@ function PresentationForm({
|
||||
}}
|
||||
className="border border-neon-cyan/20 rounded-lg p-6 bg-cyber-dark space-y-4"
|
||||
>
|
||||
<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">
|
||||
{t('presentation.description')}
|
||||
</p>
|
||||
<p className="text-xs text-cyber-accent/60 italic">
|
||||
{t('presentation.profileNote')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<PresentationFormHeader userName={userName} />
|
||||
<PresentationFields draft={draft} onChange={setDraft} />
|
||||
<ValidationError message={validationError ?? error} />
|
||||
<ArticleFormButtons loading={loading} />
|
||||
|
||||
22
components/PresentationFormHeader.tsx
Normal file
22
components/PresentationFormHeader.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { t } from '@/lib/i18n'
|
||||
|
||||
interface PresentationFormHeaderProps {
|
||||
userName: string
|
||||
}
|
||||
|
||||
export function PresentationFormHeader({ userName }: PresentationFormHeaderProps) {
|
||||
return (
|
||||
<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">
|
||||
{t('presentation.description')}
|
||||
</p>
|
||||
<p className="text-xs text-cyber-accent/60 italic">
|
||||
{t('presentation.profileNote')}
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -60,6 +60,26 @@ presentation.description=This article is required to publish on zapwall.fr. It a
|
||||
presentation.success=Presentation article created!
|
||||
presentation.successMessage=Your presentation article has been created successfully. You can now publish articles.
|
||||
presentation.notConnected=Connect with Nostr to create your presentation article
|
||||
presentation.profileNote=This profile data is specific to zapwall.fr and may differ from your Nostr profile.
|
||||
presentation.field.picture=Profile picture
|
||||
presentation.field.picture.help=Profile image for your author page (max 5MB, formats: PNG, JPG, WebP)
|
||||
presentation.field.picture.change=Change image
|
||||
presentation.field.picture.upload=Upload an image
|
||||
presentation.field.picture.uploading=Uploading...
|
||||
presentation.field.picture.remove=Remove
|
||||
presentation.field.picture.error.imagesOnly=Only images are allowed
|
||||
presentation.field.picture.error.uploadFailed=Upload error
|
||||
presentation.field.presentation=Personal presentation
|
||||
presentation.field.presentation.placeholder=Introduce yourself: who you are, your background, your interests...
|
||||
presentation.field.presentation.help=This presentation will be visible to all readers
|
||||
presentation.field.contentDescription=Content description
|
||||
presentation.field.contentDescription.placeholder=Describe the type of content you publish: science fiction, scientific research, themes covered...
|
||||
presentation.field.contentDescription.help=Help readers understand the type of articles you publish
|
||||
presentation.field.mainnetAddress=Bitcoin mainnet address (for sponsoring)
|
||||
presentation.field.mainnetAddress.placeholder=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
|
||||
presentation.field.mainnetAddress.help=Bitcoin mainnet address where you will receive sponsoring payments (0.046 BTC excluding fees per sponsoring)
|
||||
presentation.validation.invalidAddress=Invalid Bitcoin address (must start with 1, 3 or bc1)
|
||||
presentation.fallback.user=User
|
||||
|
||||
# Filters
|
||||
filters.clear=Clear all
|
||||
|
||||
@ -60,6 +60,26 @@ presentation.description=Cet article est obligatoire pour publier sur zapwall.fr
|
||||
presentation.success=Article de présentation créé !
|
||||
presentation.successMessage=Votre article de présentation a été créé avec succès. Vous pouvez maintenant publier des articles.
|
||||
presentation.notConnected=Connectez-vous avec Nostr pour créer votre article de présentation
|
||||
presentation.profileNote=Les données de ce profil sont spécifiques à zapwall.fr et peuvent différer de votre profil Nostr.
|
||||
presentation.field.picture=Photo de profil
|
||||
presentation.field.picture.help=Image de profil pour votre page auteur (max 5Mo, formats: PNG, JPG, WebP)
|
||||
presentation.field.picture.change=Changer l'image
|
||||
presentation.field.picture.upload=Télécharger une image
|
||||
presentation.field.picture.uploading=Upload en cours...
|
||||
presentation.field.picture.remove=Supprimer
|
||||
presentation.field.picture.error.imagesOnly=Seules les images sont autorisées
|
||||
presentation.field.picture.error.uploadFailed=Erreur lors de l'upload
|
||||
presentation.field.presentation=Présentation personnelle
|
||||
presentation.field.presentation.placeholder=Présentez-vous : qui êtes-vous, votre parcours, vos intérêts...
|
||||
presentation.field.presentation.help=Cette présentation sera visible par tous les lecteurs
|
||||
presentation.field.contentDescription=Description de votre contenu
|
||||
presentation.field.contentDescription.placeholder=Décrivez le type de contenu que vous publiez : science-fiction, recherche scientifique, thèmes abordés...
|
||||
presentation.field.contentDescription.help=Aidez les lecteurs à comprendre le type d'articles que vous publiez
|
||||
presentation.field.mainnetAddress=Adresse Bitcoin mainnet (pour le sponsoring)
|
||||
presentation.field.mainnetAddress.placeholder=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
|
||||
presentation.field.mainnetAddress.help=Adresse Bitcoin mainnet où vous recevrez les paiements de sponsoring (0.046 BTC hors frais par sponsoring)
|
||||
presentation.validation.invalidAddress=Adresse Bitcoin invalide (doit commencer par 1, 3 ou bc1)
|
||||
presentation.fallback.user=Utilisateur
|
||||
|
||||
# Filters
|
||||
filters.clear=Effacer tout
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user