import { useEffect, useState, useMemo, memo } from "react"; import { ArrowLeft, ArrowRight, Compass, List, BookOpen, Star, Fire, BookmarkSimple, FolderSimplePlus, Folder } from "@phosphor-icons/react"; import { gql, thumbUrl } from "../../lib/client"; import { UPDATE_MANGA } from "../../lib/queries"; 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 "./SourceList"; import SourceBrowse from "./SourceBrowse"; import s from "./Explore.module.css"; // ── Frecency ────────────────────────────────────────────────────────────────── function frecencyScore(readAt: number, count: number): number { const hoursSince = (Date.now() - readAt) / 3_600_000; return count / Math.log(hoursSince + 2); } // ── Ghost card ──────────────────────────────────────────────────────────────── function GhostCard() { return
; } const GHOST_COUNT = 3; // ── Skeleton row ────────────────────────────────────────────────────────────── function SkeletonRow({ count = 8 }: { count?: number }) { return (