diff --git a/src/components/sections/team/TeamProfile.tsx b/src/components/sections/team/TeamProfile.tsx
index e0759e6..9509ffc 100644
--- a/src/components/sections/team/TeamProfile.tsx
+++ b/src/components/sections/team/TeamProfile.tsx
@@ -1,6 +1,6 @@
-import { useState, useEffect } from "react";
+import { useState, useEffect, useRef, useCallback } from "react";
import Image from "next/image";
-import { ArrowLeft, Instagram, Trophy, GraduationCap, ExternalLink, X, MapPin, Calendar, Award, Scale } from "lucide-react";
+import { ArrowLeft, Instagram, Trophy, GraduationCap, ExternalLink, X, Award, Scale } from "lucide-react";
import type { TeamMember, RichListItem, VictoryItem } from "@/types/content";
interface TeamProfileProps {
@@ -132,17 +132,14 @@ export function TeamProfile({ member, onBack }: TeamProfileProps) {
))}
-
+
{victoryTabs.map(tab => (
-
- {tab.items.map((item, i) => (
-
- ))}
+
+
+ {tab.items.map((item, i) => (
+
+ ))}
+
))}
@@ -156,11 +153,11 @@ export function TeamProfile({ member, onBack }: TeamProfileProps) {
Образование
-
+
{member.education!.map((item, i) => (
))}
-
+
)}
@@ -171,17 +168,13 @@ export function TeamProfile({ member, onBack }: TeamProfileProps) {
Опыт
-
+
{member.experience!.map((item, i) => (
- -
-
- {item}
-
+
))}
-
+
)}
@@ -230,11 +223,53 @@ export function TeamProfile({ member, onBack }: TeamProfileProps) {
);
}
+function ScrollRow({ children }: { children: React.ReactNode }) {
+ const scrollRef = useRef(null);
+ const dragState = useRef<{ startX: number; scrollLeft: number } | null>(null);
+ const wasDragged = useRef(false);
+
+ const onPointerDown = useCallback((e: React.PointerEvent) => {
+ const el = scrollRef.current;
+ if (!el) return;
+ (e.target as HTMLElement).setPointerCapture(e.pointerId);
+ dragState.current = { startX: e.clientX, scrollLeft: el.scrollLeft };
+ wasDragged.current = false;
+ }, []);
+
+ const onPointerMove = useCallback((e: React.PointerEvent) => {
+ if (!dragState.current || !scrollRef.current) return;
+ const dx = e.clientX - dragState.current.startX;
+ if (Math.abs(dx) > 4) wasDragged.current = true;
+ scrollRef.current.scrollLeft = dragState.current.scrollLeft - dx;
+ }, []);
+
+ const onPointerUp = useCallback(() => {
+ dragState.current = null;
+ }, []);
+
+ return (
+
+ );
+}
+
function VictoryCard({ victory }: { victory: VictoryItem }) {
const hasLink = !!victory.link;
return (
-
+
{victory.place && (
@@ -270,16 +305,16 @@ function RichCard({ item, onImageClick }: { item: RichListItem; onImageClick: (s
if (hasImage) {
return (
-
+
@@ -302,7 +337,7 @@ function RichCard({ item, onImageClick }: { item: RichListItem; onImageClick: (s
}
return (
-
+
{item.text}
{hasLink && (