From e7a23f2f41cd83b68972209ede8ed77302e9dae4 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 26 Sep 2025 15:50:01 +0000 Subject: [PATCH] Add suggested videos to the live stream page sidebar Integrates a new API call to fetch suggested videos and displays them in a dedicated section on the right sidebar of the LivePage, replacing previously present informational content. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 45a1dcfc-f8a2-475a-a6b9-96fbb841dc27 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/45a1dcfc-f8a2-475a-a6b9-96fbb841dc27/E8iWmgC --- .replit | 4 ++ client/src/pages/LivePage.tsx | 76 +++++++++++++---------------------- 2 files changed, 33 insertions(+), 47 deletions(-) diff --git a/.replit b/.replit index cd990cf..e2b98af 100644 --- a/.replit +++ b/.replit @@ -15,6 +15,10 @@ run = ["npm", "run", "start"] localPort = 5000 externalPort = 80 +[[ports]] +localPort = 33305 +externalPort = 3002 + [[ports]] localPort = 34033 externalPort = 3001 diff --git a/client/src/pages/LivePage.tsx b/client/src/pages/LivePage.tsx index 3cfdc27..f95ce9e 100644 --- a/client/src/pages/LivePage.tsx +++ b/client/src/pages/LivePage.tsx @@ -2,6 +2,8 @@ import { useState, useEffect, useRef } from 'react'; import { ChevronLeft, Maximize, Volume2, VolumeX, Radio } from 'lucide-react'; import { Link } from 'wouter'; import { Button } from '@/components/ui/button'; +import { useQuery } from '@tanstack/react-query'; +import VideoCard from '@/components/video-card'; import AdSenseAd from '@/components/adsense-ad'; declare global { @@ -22,6 +24,14 @@ export default function LivePage() { // HLS stream URL const streamUrl = 'https://cdne.folxplay.tv/fxt/streams/ch-4/master.m3u8'; + // Fetch suggested videos + const { data: videosData } = useQuery({ + queryKey: ['/api/videos'], + staleTime: 5 * 60 * 1000, // 5 minutes + }); + + const videos = videosData?.videos || []; + useEffect(() => { // Set page meta tags document.title = 'LIVE Stream | video.folx.tv'; @@ -395,8 +405,26 @@ export default function LivePage() { - {/* Sidebar */} + {/* Sidebar - Suggested Videos */}