This commit is contained in:
Tomas Dvorak
2025-11-11 10:29:30 +01:00
parent d5b4faea61
commit 8762bde4bf
139 changed files with 7240 additions and 2870 deletions
+8 -2
View File
@@ -28,6 +28,7 @@ import { getCachedYouTube, YouTubeVideo } from '../services/youtube';
import { FaPlay, FaExternalLinkAlt, FaYoutube } from 'react-icons/fa';
import NewsletterCTA from '../components/common/NewsletterCTA';
import CommentsSection from '../components/comments/CommentsSection';
import { Helmet } from 'react-helmet-async';
type RenderItem = {
key: string;
@@ -79,6 +80,7 @@ const VideosPage: React.FC = () => {
const source = settings?.videos_source || 'auto';
const youtubeUrl = (settings as any)?.youtube_url || (settings as any)?.social_youtube || null;
const titleOverrides: Record<string, string> = (settings as any)?.videos_title_overrides || {};
useEffect(() => {
let canceled = false;
@@ -113,7 +115,7 @@ const VideosPage: React.FC = () => {
if (source === 'auto') {
return (yt || []).map((v) => ({
key: v.video_id,
title: v.title,
title: (titleOverrides?.[v.video_id]?.trim()) || v.title,
embedUrl: toEmbed(v.video_id),
thumbnail: v.thumbnail_url,
date: v.published_date,
@@ -142,7 +144,7 @@ const VideosPage: React.FC = () => {
};
});
return manual.length ? manual : legacy;
}, [source, yt, settings?.videos_items, settings]);
}, [source, yt, settings?.videos_items, settings, titleOverrides]);
const openVideo = (item: RenderItem) => {
setSelectedVideo(item);
@@ -267,6 +269,10 @@ const VideosPage: React.FC = () => {
return (
<MainLayout>
<Helmet>
<title>Videa</title>
<meta name="description" content="Sledujte naše nejnovější videa a zápasy." />
</Helmet>
<Container maxW="7xl" py={{ base: 6, md: 10 }}>
<Box mb={6}>
<HStack justify="space-between" mb={2} flexWrap="wrap">