From a34fc283454fc6a98cb8b384142944ca58a11c55 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 1 Sep 2025 04:52:39 +0000 Subject: [PATCH] Improve search functionality to include video titles and descriptions Update FolxStadlPage to filter videos by title and description based on search query, enhancing search relevance. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ab9cd02a-d0b2-4288-9ceb-1964d0059648 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/ab9cd02a-d0b2-4288-9ceb-1964d0059648/Uw7sw4i --- client/src/pages/FolxStadlPage.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/src/pages/FolxStadlPage.tsx b/client/src/pages/FolxStadlPage.tsx index 41df7cd..f748164 100644 --- a/client/src/pages/FolxStadlPage.tsx +++ b/client/src/pages/FolxStadlPage.tsx @@ -27,10 +27,19 @@ export default function FolxStadlPage() { const videos = data?.videos || []; // Filter all FOLX STADL videos (including all seasons and formats) - const folxStadlVideos = videos.filter(video => + let folxStadlVideos = videos.filter(video => video.title.includes("FOLX STADL") || video.title.includes("FOLXSTADL") ); + // Apply search filter if search query exists + if (searchQuery && searchQuery.length >= 2) { + const searchLower = searchQuery.toLowerCase(); + folxStadlVideos = folxStadlVideos.filter(video => + video.title.toLowerCase().includes(searchLower) || + video.description?.toLowerCase().includes(searchLower) + ); + } + // Pagination logic const totalPages = Math.ceil(folxStadlVideos.length / itemsPerPage); const startIndex = (currentPage - 1) * itemsPerPage;