Add specific videos for the Folx Stadl S04 series to the platform

Update the data fetching logic in FolxStadlPage to correctly retrieve and filter videos related to "FOLX STADL S4" from the API endpoint.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/mlEmv7S
This commit is contained in:
sebastjanartic 2025-08-30 16:03:22 +00:00
parent 7c60129fd4
commit 753c82daaf

View File

@ -10,14 +10,20 @@ export default function FolxStadlPage() {
const [selectedVideo, setSelectedVideo] = useState<Video | null>(null);
const [isModalOpen, setIsModalOpen] = useState(false);
const { data: videos = [], isLoading } = useQuery<Video[]>({
queryKey: ['/api/videos']
const { data, isLoading } = useQuery<{videos: Video[], total: number}>({
queryKey: ['/api/videos'],
select: (response) => response || { videos: [], total: 0 }
});
const videos = data?.videos || [];
// Filter only FOLX STADL S4 videos
const folxStadlVideos = Array.isArray(videos) ? videos.filter(video =>
const folxStadlVideos = videos.filter(video =>
video.title.includes("FOLX STADL S4")
) : [];
);
console.log('Total videos:', videos.length);
console.log('FOLX STADL videos:', folxStadlVideos.length);
const handleVideoClick = (video: Video) => {
setSelectedVideo(video);