import { useEffect, useState, useMemo, useRef, memo } from "react"; import { ArrowRight, Compass, List, BookOpen, Star, Fire, BookmarkSimple, FolderSimplePlus, Folder } from "@phosphor-icons/react"; import GenreDrillPage from "./GenreDrillPage"; import { gql, thumbUrl } from "../../lib/client"; import { UPDATE_MANGA } from "../../lib/queries"; import { cache, CACHE_KEYS, getTopSources } from "../../lib/cache"; import { dedupeSources, dedupeMangaByTitle } from "../../lib/sourceUtils"; import ContextMenu, { type ContextMenuEntry } from "../context/ContextMenu"; import { GET_ALL_MANGA, GET_LIBRARY, GET_SOURCES, FETCH_SOURCE_MANGA } from "../../lib/queries"; import { useStore } from "../../store"; import type { Manga, Source } from "../../lib/types"; import SourceList from "../sources/SourceList"; import SourceBrowse from "../sources/SourceBrowse"; import s from "./Explore.module.css"; // ── Frecency score ──────────────────────────────────────────────────────────── function frecencyScore(readAt: number, count: number): number { const hoursSince = (Date.now() - readAt) / 3_600_000; return count / Math.log(hoursSince + 2); } // ── Ghost / Skeleton ────────────────────────────────────────────────────────── function GhostCard() { return
; } const GHOST_COUNT = 3; const ROW_CAP = 25; // Hijack vertical wheel delta → horizontal scroll on .row divs function handleRowWheel(e: React.WheelEvent