Update navigation to use router for smoother video transitions
Replaced window.location.href with setLocation from wouter for client-side routing to individual video pages. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 344ec1e0-1186-4058-bbff-2e9619a7b1e0 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/344ec1e0-1186-4058-bbff-2e9619a7b1e0/FgaI1Sc
This commit is contained in:
parent
fbc1bfab09
commit
9bf9eb7cd0
@ -1,4 +1,5 @@
|
||||
import { useState, useRef, useEffect } from "react";
|
||||
import { useLocation } from "wouter";
|
||||
import { type Video } from "@shared/schema";
|
||||
import VideoCard from "./video-card";
|
||||
import BunnyVideoModal from "./bunny-video-modal";
|
||||
@ -18,10 +19,11 @@ interface NetflixGridProps {
|
||||
export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
|
||||
const [selectedVideo, setSelectedVideo] = useState<Video | null>(null);
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
const [, setLocation] = useLocation();
|
||||
|
||||
const handleVideoClick = (video: Video) => {
|
||||
// Navigate to individual video page instead of modal
|
||||
window.location.href = `/video/${video.id}`;
|
||||
setLocation(`/video/${video.id}`);
|
||||
};
|
||||
|
||||
const handleCloseModal = () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user