diff --git a/backend/routers/shows.py b/backend/routers/shows.py index 38bc785..c7e37bf 100644 --- a/backend/routers/shows.py +++ b/backend/routers/shows.py @@ -19,7 +19,7 @@ def create_show(show: ShowCreate, session: Session = Depends(get_session), curre @router.get("/", response_model=List[ShowRead]) def read_shows( offset: int = 0, - limit: int = Query(default=100, le=100), + limit: int = Query(default=2000, le=5000), venue_id: int = None, tour_id: int = None, year: int = None, diff --git a/frontend/app/shows/page.tsx b/frontend/app/shows/page.tsx index 0a78d7d..0469391 100644 --- a/frontend/app/shows/page.tsx +++ b/frontend/app/shows/page.tsx @@ -5,6 +5,7 @@ import { getApiUrl } from "@/lib/api-config" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import Link from "next/link" import { Calendar, MapPin } from "lucide-react" +import { Skeleton } from "@/components/ui/skeleton" interface Show { id: number @@ -22,7 +23,7 @@ export default function ShowsPage() { const [loading, setLoading] = useState(true) useEffect(() => { - fetch(`${getApiUrl()}/shows/?limit=50`) + fetch(`${getApiUrl()}/shows/?limit=2000`) .then(res => res.json()) .then(data => { // Sort by date descending @@ -35,10 +36,38 @@ export default function ShowsPage() { .finally(() => setLoading(false)) }, []) - if (loading) return
Loading shows...
+ if (loading) { + return ( +
+
+ + +
+ +
+ {Array.from({ length: 12 }).map((_, i) => ( + + +
+ + +
+
+ +
+ + +
+
+
+ ))} +
+
+ ) + } return ( -
+

Shows

@@ -48,11 +77,11 @@ export default function ShowsPage() {

{shows.map((show) => ( - - + + - - + + {new Date(show.date).toLocaleDateString(undefined, { weekday: 'long', year: 'numeric', @@ -62,7 +91,7 @@ export default function ShowsPage() { -
+
{show.venue?.name}, {show.venue?.city}, {show.venue?.state} diff --git a/frontend/components/ui/skeleton.tsx b/frontend/components/ui/skeleton.tsx new file mode 100644 index 0000000..cbb1704 --- /dev/null +++ b/frontend/components/ui/skeleton.tsx @@ -0,0 +1,15 @@ +import { cn } from "@/lib/utils" + +function Skeleton({ + className, + ...props +}: React.HTMLAttributes) { + return ( +
+ ) +} + +export { Skeleton }