Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/components/profile/edit-profile-about-fields.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/components/profile/edit-profile-about-fields.tsx |
| Original SHA-256 | 4704c797301f9ac835ab0afec78090f201c3def60a6970615cf6af7c85ed3db3 |
| Git blob SHA | 170c4be195d592b7c09a1ddd370a49e3918b15db |
| Reading-copy SHA-256 | 4704c797301f9ac835ab0afec78090f201c3def60a6970615cf6af7c85ed3db3 |
Recovered source transcript
Download complete source text ↓66 lines · 2.5 KB
'use client'
import { CharacterCounter } from '@/components/ui/character-counter'
interface AboutFieldsProps {
uniqueId: string
formData: {
work: string
bio: string
}
setFormData: (updater: (prev: any) => any) => void
isLoading: boolean
}
/**
* About section fields for the profile edit form
* @param props - Component props
*/
export function AboutFields({ uniqueId, formData, setFormData, isLoading }: AboutFieldsProps) {
return (
<fieldset className="space-y-4">
<legend className="text-sm font-semibold text-muted-foreground uppercase tracking-wide">
About You
</legend>
<div className="space-y-2">
<label htmlFor={`${uniqueId}-work`} className="text-sm font-medium block">
Work <span className="text-xs text-muted-foreground">(optional)</span>
</label>
<input
id={`${uniqueId}-work`}
type="text"
placeholder="e.g., Software Engineer at Company"
value={formData.work}
onChange={e => {
setFormData(prev => ({ ...prev, work: e.target.value }))
}}
disabled={isLoading}
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
/>
</div>
<div className="space-y-2">
<label htmlFor={`${uniqueId}-bio`} className="text-sm font-medium block">
Bio <span className="text-xs text-muted-foreground">(optional)</span>
</label>
<textarea
id={`${uniqueId}-bio`}
placeholder="Tell us about yourself..."
value={formData.bio}
onChange={e => {
if (e.target.value.length <= 160) {
setFormData(prev => ({ ...prev, bio: e.target.value }))
}
}}
disabled={isLoading}
maxLength={160}
rows={3}
className="flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none"
/>
<CharacterCounter current={formData.bio.length} max={160} />
</div>
</fieldset>
)
}