- Home: mode switcher moved to its own row (no longer crammed next to title on mobile), hide-watched simplified to text-only toggle - Home/History/Discovery: pagination buttons text-sm → text-xs, page counter text-sm → text-xs - Liked/Downloads/SearchResults: top-level gap-8 → gap-6 - Liked: refresh button px-4 py-2 text-sm → px-3 py-1.5 text-xs - Empty states: standardize to text-zinc-500 text-sm across Queue, ContinueWatching, History, Following, Discovery, Liked - Following: "Latest uploads" tab label → "Feed" - Home: remove -mt-3 hacks from mode description rows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
import { useQuery } from "@tanstack/react-query";
|
|
import { continueWatching } from "../api";
|
|
import VideoCard from "../components/VideoCard";
|
|
|
|
export default function ContinueWatchingPage() {
|
|
const { data: videos = [], isLoading } = useQuery({
|
|
queryKey: ["continue-watching"],
|
|
queryFn: () => continueWatching().then((r) => r.data),
|
|
staleTime: 30_000,
|
|
});
|
|
|
|
return (
|
|
<div className="flex flex-col gap-6">
|
|
<h1 className="font-display font-bold text-2xl text-zinc-100">Continue Watching</h1>
|
|
|
|
{isLoading ? (
|
|
<div className="flex items-center justify-center py-24">
|
|
<div className="w-8 h-8 border-2 border-accent border-t-transparent rounded-full animate-spin" />
|
|
</div>
|
|
) : videos.length === 0 ? (
|
|
<div className="flex flex-col items-center gap-4 py-24 text-center">
|
|
<div className="w-16 h-16 rounded-full bg-zinc-800 flex items-center justify-center">
|
|
<svg className="w-7 h-7 text-zinc-600" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M8 5v14l11-7z" />
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<p className="text-zinc-500 text-sm">Nothing in progress</p>
|
|
<p className="text-zinc-500 text-sm mt-1">
|
|
Videos you've started but not finished will appear here.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
) : (
|
|
<>
|
|
<p className="text-sm text-zinc-500 -mt-2">{videos.length} video{videos.length !== 1 ? "s" : ""} in progress</p>
|
|
<div className="flex flex-col gap-2">
|
|
{videos.map((v) => (
|
|
<VideoCard
|
|
key={v.youtube_video_id}
|
|
video={{ ...v, is_watched: false }}
|
|
variant="list"
|
|
/>
|
|
))}
|
|
</div>
|
|
</>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|