diff --git a/app/(app)/explore/_components/CalendarCard.tsx b/app/(app)/explore/_components/CalendarCard.tsx index 4e8336c..3b76f6f 100644 --- a/app/(app)/explore/_components/CalendarCard.tsx +++ b/app/(app)/explore/_components/CalendarCard.tsx @@ -10,6 +10,7 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; +import { cn } from "@/lib/utils"; import { NDKEvent } from "@nostr-dev-kit/ndk"; import { BANNER } from "@/constants/app"; import { getNameToShow } from "@/lib/utils"; @@ -18,6 +19,8 @@ import useProfile from "@/lib/hooks/useProfile"; import useEvents from "@/lib/hooks/useEvents"; import { getTagAllValues, getTagValues } from "@/lib/nostr/utils"; import { useNDK } from "@/app/_providers/ndk"; +import { Skeleton } from "@/components/ui/skeleton"; +import { AspectRatio } from "@/components/ui/aspect-ratio"; type CalendarCardProps = { calendar: NDKEvent; @@ -144,3 +147,43 @@ export default function CalendarCard({ calendar }: CalendarCardProps) { ); } +export function LoadingCalendarCard() { + const textColor = "bg-zinc-200"; + return ( + + + + + + + + + + + + + + + + + + + + + + + Upcoming Events: + + + + + + + + + + + + + ); +} diff --git a/app/(app)/explore/_sections/ExploreCalendars.tsx b/app/(app)/explore/_sections/ExploreCalendars.tsx index a502d39..56e4d62 100644 --- a/app/(app)/explore/_sections/ExploreCalendars.tsx +++ b/app/(app)/explore/_sections/ExploreCalendars.tsx @@ -11,7 +11,7 @@ import { getTagValues } from "@/lib/nostr/utils"; import { NDKEvent, NDKKind, NDKUserProfile } from "@nostr-dev-kit/ndk"; import { useNDK } from "@nostr-dev-kit/ndk-react"; -import CalendarCard from "../_components/CalendarCard"; +import CalendarCard, { LoadingCalendarCard } from "../_components/CalendarCard"; export default function ExploreCalendars() { return ( @@ -35,14 +35,30 @@ function HorizontalCarousel() { limit: 5, }, }); + + if (events.length) { + return ( + + {events.map((calendar, index) => ( + + + + ))} + + ); + } + return ( - {events.map((calendar, index) => ( + {Array.from(Array(5)).map((_, index) => ( - + ))}