Build
This commit is contained in:
@@ -1,86 +1,20 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import Image from 'next/image';
|
||||
import Header from "@/components/Header";
|
||||
import Footer from "@/components/Footer";
|
||||
import { dataStore } from '@/lib/dataStore';
|
||||
import type { MediaItem } from '@/data/media';
|
||||
|
||||
export default function MediaGallery() {
|
||||
const [mediaItems, setMediaItems] = useState<MediaItem[]>([]);
|
||||
const [selectedTab, setSelectedTab] = useState<'all' | 'video' | 'photo'>('all');
|
||||
const [selectedMedia, setSelectedMedia] = useState<number | null>(null);
|
||||
|
||||
const mediaItems = [
|
||||
{
|
||||
id: 1,
|
||||
type: 'video',
|
||||
title: 'A2 Metro Hattı Genel Tanıtım',
|
||||
thumbnail: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg',
|
||||
videoUrl: 'https://www.youtube.com/embed/b9q88QDEcKg',
|
||||
date: '15 Ekim 2025',
|
||||
duration: '5:32',
|
||||
description: 'A2 Metro Hattı projesinin genel tanıtımı ve istasyonların detayları'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
type: 'photo',
|
||||
title: 'Dikimevi İstasyonu İnşaat Çalışmaları',
|
||||
thumbnail: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg',
|
||||
date: '12 Ekim 2025',
|
||||
description: 'Dikimevi metro istasyonunda devam eden kazı ve inşaat çalışmaları'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
type: 'photo',
|
||||
title: 'Tuzluçayır İstasyonu Temel Atma',
|
||||
thumbnail: 'https://images.pexels.com/photos/33950678/pexels-photo-33950678.jpeg',
|
||||
date: '10 Ekim 2025',
|
||||
description: 'Tuzluçayır istasyonunun temel atma töreni anları'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
type: 'video',
|
||||
title: 'Metro İnşaatı İlerleme Raporu',
|
||||
thumbnail: 'https://images.pexels.com/photos/253647/pexels-photo-253647.jpeg',
|
||||
videoUrl: 'https://www.youtube.com/embed/b9q88QDEcKg',
|
||||
date: '8 Ekim 2025',
|
||||
duration: '8:15',
|
||||
description: 'Ekim ayı metro inşaatı ilerleme raporu ve gelecek hedefler'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
type: 'photo',
|
||||
title: 'Modern İstasyon Tasarımları',
|
||||
thumbnail: 'https://images.pexels.com/photos/17152223/pexels-photo-17152223.jpeg',
|
||||
date: '5 Ekim 2025',
|
||||
description: 'Yeni nesil metro istasyonlarının modern iç mekan tasarımları'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
type: 'video',
|
||||
title: 'Çevre Dostu Metro Projesi',
|
||||
thumbnail: 'https://images.pexels.com/photos/17302615/pexels-photo-17302615.jpeg',
|
||||
videoUrl: 'https://www.youtube.com/embed/b9q88QDEcKg',
|
||||
date: '1 Ekim 2025',
|
||||
duration: '6:45',
|
||||
description: 'Metro projesinde kullanılan çevre dostu teknolojiler ve sürdürülebilir yaklaşımlar'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
type: 'photo',
|
||||
title: 'İşçi Güvenliği Eğitimi',
|
||||
thumbnail: 'https://images.pexels.com/photos/33950678/pexels-photo-33950678.jpeg',
|
||||
date: '28 Eylül 2025',
|
||||
description: 'İnşaat sahalarında iş güvenliği eğitimleri'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
type: 'photo',
|
||||
title: 'Ray Döşeme Çalışmaları',
|
||||
thumbnail: 'https://images.pexels.com/photos/253647/pexels-photo-253647.jpeg',
|
||||
date: '25 Eylül 2025',
|
||||
description: 'Metro hattında ray döşeme işlemlerinin başlaması'
|
||||
},
|
||||
];
|
||||
useEffect(() => {
|
||||
setMediaItems(dataStore.getMedia());
|
||||
}, []);
|
||||
|
||||
const filteredMedia = selectedTab === 'all'
|
||||
? mediaItems
|
||||
|
||||
Reference in New Issue
Block a user