"use client"; import * as React from "react"; import { motion } from "framer-motion"; import { Search } from "lucide-react"; import type { Job } from "@/lib/api"; import { item, useMotionOK } from "@/lib/motion"; const EXAMPLES = [ "Radiohead Creep", "Kendrick Lamar Money Trees", "Fleetwood Mac Dreams", "Tame Impala The Less I Know The Better", "Frank Ocean Ivy", ]; /** * The first screen. * * It used to be a floating disc, a heading, and five hardcoded example chips — * a decorated placeholder that said nothing about this install. Leading with * the artwork of what has actually been imported makes the empty state a * library view instead, and falls back to the examples only when there is * genuinely nothing to show. */ export function Welcome({ onPick, recent, }: { onPick: (q: string) => void; recent: Job[]; }) { const ok = useMotionOK(); const seen = new Set(); const imported = recent .filter((j) => j.state === "imported" && j.cover) .filter((j) => { const k = `${j.artist}|${j.album ?? j.title}`; if (seen.has(k)) return false; seen.add(k); return true; }) .slice(0, 12); return (

Find anything.

Search a song, preview it, and press Get. It arrives in your library correctly tagged — right artist, right album, right track number.

{imported.length > 0 ? (

Recently added

{imported.map((j, i) => ( onPick(`${j.artist} ${j.title}`)} className="focus-ring group text-left" > {/* eslint-disable-next-line @next/next/no-img-element */}
{j.title}
{j.artist}
))}
) : (

Try one of these

{EXAMPLES.map((e, i) => ( onPick(e)} className="focus-ring rounded-pill border border-edge bg-[var(--surface)] px-3.5 py-1.5 text-callout text-dim transition-colors hover:border-accent-line hover:bg-accent-soft hover:text-accent" > {e} ))}
)}
); }