import { Compass } from '../../lib/icons' export interface TimeSlot { title: string subtitle: string genres: string[] } export function pickTimeOfDaySlot(): TimeSlot { const hour = new Date().getHours() if (hour >= 5 && hour < 12) { return { title: 'A gentle start', subtitle: 'Morning picks - light comedy, animation, and feel-good', genres: ['Comedy', 'Animation', 'Family'], } } if (hour >= 12 && hour < 17) { return { title: 'Afternoon adventure', subtitle: 'Action, sci-fi, and adventure for the daylight hours', genres: ['Action', 'Adventure', 'Science Fiction'], } } if (hour >= 17 && hour < 22) { return { title: 'Evening watch', subtitle: 'Prestige drama and thrillers for prime time', genres: ['Drama', 'Thriller', 'Mystery'], } } return { title: 'After hours', subtitle: 'Horror, noir, and the dark stuff for late nights', genres: ['Horror', 'Crime', 'Thriller'], } } /** Day-bucketed shuffle - rotates a few times a day, stable within a session. */ export function dailyBucket(): number { // Changes every 6 hours so the order rotates a few times a day return Math.floor(Date.now() / (6 * 3600 * 1000)) } export function seededShuffle(arr: T[], seed: number): T[] { const out = [...arr] let s = seed | 0 const random = () => { s = (s + 0x6D2B79F5) | 0 let t = Math.imul(s ^ (s >>> 15), 1 | s) t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t return ((t ^ (t >>> 14)) >>> 0) / 4294967296 } for (let i = out.length - 1; i > 0; i--) { const j = Math.floor(random() * (i + 1)) ;[out[i], out[j]] = [out[j], out[i]] } return out } export function Dot() { return ยท } export function HomeSkeleton() { return (
{[0, 1, 2].map(i => (
{Array.from({ length: 6 }).map((_, j) => (
))}
))}
) } export function EmptyHome() { return (

Welcome to Jellybloom

Your library is quiet. Add movies, shows, or music to your server and they'll appear here.

) }