-
- {/* Watch History Section */}
-
-
+
+ {showUserLists && (
+
+ {/* Header */}
+
+
+
+ My Lists
+
+
+
+ {/* Content */}
+
+ {/* Watch History Section */}
+
+
toggleSection('history')}
+ icon={
+
+ }
title="Watch History"
- items={watchHistory}
- emptyMessage="No watch history yet"
- onItemClick={handleListItemClick}
+ count={watchHistory?.length}
/>
+
+
+
-
- {/* Watchlist Section */}
-
-
-
-
- }
- title="Watchlist"
- count={watchlist?.length}
- />
-
-
+ toggleSection('watchlist')}
+ icon={
+
+ }
title="Watchlist"
- items={watchlist}
- emptyMessage="Your watchlist is empty"
- onItemClick={handleListItemClick}
+ count={watchlist?.length}
/>
+
+
+
-
- {/* Favorites Section */}
-
-
-
-
- }
- title="Favorites"
- count={favorites?.length}
- />
-
-
+ toggleSection('favorites')}
+ icon={
+
+ }
title="Favorites"
- items={favorites}
- emptyMessage="No favorites added"
- onItemClick={handleListItemClick}
+ count={favorites?.length}
/>
+
+
+
-
-
- {/* Footer with improved gradient button */}
-
-
-
-
+ {/* Footer */}
+
+
setShowUserLists(false)}
+ className={`w-full py-3 px-4 ${
+ isDarkMode
+ ? 'bg-[#02c39a] hover:bg-[#00a896]'
+ : 'bg-blue-500 hover:bg-blue-600'
+ } text-white rounded-xl
+ transition-all duration-200 transform hover:scale-[1.02] active:scale-[0.98]
+ font-medium flex items-center justify-center gap-2
+ shadow-sm hover:shadow-md`}
+ >
+
+ View Full Profile
+
+
+
+ )}
+
>
);
};
diff --git a/src/components/WatchPage.js b/src/components/WatchPage.js
index 9db92f9..f143215 100644
--- a/src/components/WatchPage.js
+++ b/src/components/WatchPage.js
@@ -24,12 +24,15 @@ const API_KEY = process.env.REACT_APP_TMDB_API_KEY;
const BASE_URL = process.env.REACT_APP_TMDB_BASE_URL;
const lightModeStyles = {
- containerBg: 'bg-white',
+ containerBg: 'bg-gray-50',
textColor: 'text-gray-900',
cardBg: 'bg-white',
cardBorder: 'border border-gray-200',
buttonBg: 'bg-blue-500 hover:bg-blue-600',
- buttonText: 'text-white'
+ buttonText: 'text-white',
+ titleColor: 'text-gray-800',
+ secondaryText: 'text-gray-600',
+ tertiaryText: 'text-gray-500'
};
const WatchPage = () => {
@@ -66,8 +69,6 @@ const WatchPage = () => {
const [similar, setSimilar] = useState([]);
const [currentEpisode, setCurrentEpisode] = useState(null);
const [episodeLayout, setEpisodeLayout] = useState('list'); // 'list' or 'grid'
- const [showBackgroundPoster, setShowBackgroundPoster] = useState(false);
- const [isLowEndDevice, setIsLowEndDevice] = useState(false);
const [isFullscreen, setIsFullscreen] = useState(false);
const [isDistractFree, setIsDistractFree] = useState(false);
@@ -342,7 +343,6 @@ const WatchPage = () => {
useEffect(() => {
const handleScroll = () => {
const scrollPosition = window.scrollY;
- setShowBackgroundPoster(scrollPosition > 100);
setShowQuickActions(scrollPosition > 200);
};
window.addEventListener('scroll', handleScroll);
@@ -384,25 +384,6 @@ const WatchPage = () => {
fetchAdditionalData();
}, [type, id]);
- useEffect(() => {
- const checkDevicePerformance = () => {
- // Check if device is low-end based on memory and CPU cores
- if ('deviceMemory' in navigator || 'hardwareConcurrency' in navigator) {
- const lowMemory = navigator.deviceMemory < 4;
- const lowCPU = navigator.hardwareConcurrency < 4;
- setIsLowEndDevice(lowMemory || lowCPU);
- } else {
- // Fallback to user agent check for mobile devices
- const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
- navigator.userAgent
- );
- setIsLowEndDevice(isMobile);
- }
- };
-
- checkDevicePerformance();
- }, []);
-
// Add fullscreen detection
useEffect(() => {
const handleFullscreenChange = () => {
@@ -443,8 +424,6 @@ const WatchPage = () => {
return () => window.removeEventListener('orientationchange', handleOrientationChange);
}, []);
- const shouldShowBackgroundPoster = !isLowEndDevice && showBackgroundPoster;
-
if (isLoading) {
return (
@@ -525,30 +504,6 @@ const WatchPage = () => {
exit="exit"
variants={pageTransition}
>
- {/* Background Poster - Now conditional based on device performance */}
- {item?.poster_path && shouldShowBackgroundPoster && (
-
-
-
- )}
-
{/* Main Content */}
@@ -571,11 +526,20 @@ const WatchPage = () => {
exit={{ opacity: 0, height: 0 }}
className="flex flex-col gap-4 mb-6"
>
-
+
{item?.title || item?.name}
+
+ {item?.release_date?.slice(0, 4) || item?.first_air_date?.slice(0, 4)}
+ {item?.vote_average && (
+
+ ★{' '}
+ {item.vote_average.toFixed(1)}
+
+ )}
+
{item?.tagline && (
-
+
{item.tagline}
)}
@@ -621,8 +585,11 @@ const WatchPage = () => {
className="mb-2 sm:mb-4 relative z-[70]"
variants={itemVariants}
>
-