This commit is contained in:
Şahan Hasret
2025-11-20 16:50:28 +03:00
parent 08c426f97b
commit c0b7fb463e
15 changed files with 1395 additions and 646 deletions

View File

@@ -25,11 +25,13 @@ export default function Home() {
// Gerçek veriler için state
const [heroSlides, setHeroSlides] = useState(dataStore.getSlider());
const [newsData, setNewsData] = useState(dataStore.getNews());
const [liveStreamConfig, setLiveStreamConfig] = useState(dataStore.getLiveStream());
// Verileri yükle
useEffect(() => {
setHeroSlides(dataStore.getSlider());
setNewsData(dataStore.getNews());
setLiveStreamConfig(dataStore.getLiveStream());
}, []);
// Modal açıldığında yukarı kaydır - KALDIRILDI (kullanıcı deneyimi için)
@@ -290,13 +292,13 @@ export default function Home() {
</div>
{/* Canlı Yayın Video Bölümü */}
{showLiveStream && (
{showLiveStream && liveStreamConfig.active && (
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 md:pt-32 pb-8">
<div className="bg-white rounded-2xl shadow-2xl p-6 lg:p-8">
<div className="flex items-center justify-between mb-6">
<div className="flex items-center space-x-3">
<div className="w-3 h-3 bg-red-500 rounded-full animate-pulse"></div>
<h2 className="text-2xl font-bold text-[#004B87]">Canlı Yayın</h2>
<h2 className="text-2xl font-bold text-[#004B87]">{liveStreamConfig.title || 'Canlı Yayın'}</h2>
</div>
<button
onClick={() => setShowLiveStream(false)}
@@ -312,8 +314,8 @@ export default function Home() {
<div className="relative w-full" style={{paddingBottom: '56.25%'}}>
<iframe
className="absolute top-0 left-0 w-full h-full rounded-lg"
src="https://www.youtube.com/embed/b9q88QDEcKg?autoplay=1"
title="Canlı Yayın"
src={liveStreamConfig.url}
title={liveStreamConfig.title || 'Canlı Yayın'}
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>