Improve video modal and grid scrolling functionality
Removes debug logs from the video modal and adds console logs for grid scrolling events in NetflixGrid. 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/DVZN4Rp
This commit is contained in:
parent
1ad9d9860b
commit
27f1e6906e
@ -54,10 +54,6 @@ function formatDate(date: Date | string): string {
|
|||||||
export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos = [], onVideoChange }: BunnyVideoModalProps) {
|
export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos = [], onVideoChange }: BunnyVideoModalProps) {
|
||||||
const [showShareMenu, setShowShareMenu] = useState(false);
|
const [showShareMenu, setShowShareMenu] = useState(false);
|
||||||
|
|
||||||
// Debug log
|
|
||||||
useEffect(() => {
|
|
||||||
console.log('Modal state:', { isOpen, video: video?.title || 'none' });
|
|
||||||
}, [isOpen, video]);
|
|
||||||
|
|
||||||
// Navigation functions
|
// Navigation functions
|
||||||
const getCurrentVideoIndex = () => {
|
const getCurrentVideoIndex = () => {
|
||||||
|
|||||||
@ -139,6 +139,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
const [clickedVideoId, setClickedVideoId] = useState<string | null>(null);
|
const [clickedVideoId, setClickedVideoId] = useState<string | null>(null);
|
||||||
|
|
||||||
const scroll = (direction: 'left' | 'right') => {
|
const scroll = (direction: 'left' | 'right') => {
|
||||||
|
console.log('Scroll clicked:', direction);
|
||||||
if (scrollRef.current) {
|
if (scrollRef.current) {
|
||||||
// Viewport-based scroll amount for full-width cards
|
// Viewport-based scroll amount for full-width cards
|
||||||
const containerWidth = scrollRef.current.clientWidth;
|
const containerWidth = scrollRef.current.clientWidth;
|
||||||
@ -149,6 +150,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
? currentScroll - scrollAmount
|
? currentScroll - scrollAmount
|
||||||
: currentScroll + scrollAmount;
|
: currentScroll + scrollAmount;
|
||||||
|
|
||||||
|
console.log('Scrolling from', currentScroll, 'to', targetScroll);
|
||||||
scrollRef.current.scrollTo({
|
scrollRef.current.scrollTo({
|
||||||
left: targetScroll,
|
left: targetScroll,
|
||||||
behavior: 'smooth'
|
behavior: 'smooth'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user