import React, { useEffect } from 'react'; import { useParams, Link } from 'react-router-dom'; import { ArrowLeft, Share2, Play, Calendar, User, Building2 } from 'lucide-react'; import { MOCK_INTERVIEWS } from '../services/mockData'; import { InterviewType } from '../types'; const InterviewDetailPage = () => { const { id } = useParams(); const interview = MOCK_INTERVIEWS.find(i => i.id === id); useEffect(() => { window.scrollTo(0, 0); }, [id]); if (!interview) return null; // Helper to get YouTube embed URL const getEmbedUrl = (url: string) => { const regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/; const match = url.match(regExp); return (match && match[2].length === 11) ? `https://www.youtube.com/embed/${match[2]}` : null; }; const isVideo = interview.type === InterviewType.VIDEO; return (
Vidéo non disponible
{paragraph}
)) ) : ({interview.excerpt}
)}