import { useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { useAuth } from "@/hooks/useAuth"; import CategoryTabs from "@/components/CategoryTabs"; import MediaOutletCard from "@/components/MediaOutletCard"; import AuctionCard from "@/components/AuctionCard"; import type { MediaOutlet, Auction } from "@shared/schema"; export default function Home() { const { user } = useAuth(); const [selectedCategory, setSelectedCategory] = useState("people"); const { data: mediaOutlets = [], isLoading: outletsLoading } = useQuery({ queryKey: ["/api/media-outlets", selectedCategory], }); const { data: auctions = [], isLoading: auctionsLoading } = useQuery({ queryKey: ["/api/auctions"], }); const handleLogout = () => { window.location.href = "/api/logout"; }; return (
{/* Header */}
S
SAPIENS
Welcome, {user?.firstName || 'User'}
{/* Hero Section */}

Media Intelligence & Prediction Markets

Access premium media outlets across People, Topics, and Companies. Participate in prediction markets and bid for exclusive editorial rights.

{/* Category Tabs */} {/* Media Outlets Grid */}
{outletsLoading ? (
{Array.from({ length: 8 }).map((_, i) => (
))}
) : (
{mediaOutlets.map((outlet) => ( ))}
)}
{/* Current Auctions Section */}

Active Media Outlet Auctions

{auctionsLoading ? (
{Array.from({ length: 2 }).map((_, i) => (
))}
) : (
{auctions.slice(0, 2).map((auction) => ( ))}
)}
); }