feat: add trainer bio (experience, victories, education) across all layers
- Extend TeamMember type with experience/victories/education string arrays - Add DB columns with auto-migration for existing databases - Update API POST route to accept bio fields - Add ListField component for editing string arrays in admin - Add bio section (Опыт/Достижения/Образование) to team member admin form - Create TeamProfile component with full profile view (photo + bio sections) - Add "Подробнее" button to TeamMemberInfo that toggles to profile view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { SectionHeading } from "@/components/ui/SectionHeading";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import { TeamCarousel } from "@/components/sections/team/TeamCarousel";
|
||||
import { TeamMemberInfo } from "@/components/sections/team/TeamMemberInfo";
|
||||
import { TeamProfile } from "@/components/sections/team/TeamProfile";
|
||||
import type { SiteContent } from "@/types/content";
|
||||
|
||||
interface TeamProps {
|
||||
@@ -13,6 +14,7 @@ interface TeamProps {
|
||||
|
||||
export function Team({ data: team }: TeamProps) {
|
||||
const [activeIndex, setActiveIndex] = useState(0);
|
||||
const [showProfile, setShowProfile] = useState(false);
|
||||
|
||||
return (
|
||||
<section
|
||||
@@ -37,17 +39,27 @@ export function Team({ data: team }: TeamProps) {
|
||||
|
||||
<Reveal>
|
||||
<div className="mt-10">
|
||||
<TeamCarousel
|
||||
members={team.members}
|
||||
activeIndex={activeIndex}
|
||||
onActiveChange={setActiveIndex}
|
||||
/>
|
||||
{!showProfile ? (
|
||||
<>
|
||||
<TeamCarousel
|
||||
members={team.members}
|
||||
activeIndex={activeIndex}
|
||||
onActiveChange={setActiveIndex}
|
||||
/>
|
||||
|
||||
<TeamMemberInfo
|
||||
members={team.members}
|
||||
activeIndex={activeIndex}
|
||||
onSelect={setActiveIndex}
|
||||
/>
|
||||
<TeamMemberInfo
|
||||
members={team.members}
|
||||
activeIndex={activeIndex}
|
||||
onSelect={setActiveIndex}
|
||||
onOpenBio={() => setShowProfile(true)}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<TeamProfile
|
||||
member={team.members[activeIndex]}
|
||||
onBack={() => setShowProfile(false)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user