diff --git a/app/(app)/explore/_components/CalendarSection.tsx b/app/(app)/explore/_components/CalendarSection.tsx index 02c7656..5a5e123 100644 --- a/app/(app)/explore/_components/CalendarSection.tsx +++ b/app/(app)/explore/_components/CalendarSection.tsx @@ -1,13 +1,19 @@ "use client"; import { useRef, useEffect, useState } from "react"; -import { CardLoading } from "@/components/Cards/CalendarEvent"; -import { formatDate, fromUnix, relativeTime } from "@/lib/utils/dates"; +import { + formatDate, + fromUnix, + relativeTime, + addMinutesToDate, +} from "@/lib/utils/dates"; import useCurrentUser from "@/lib/hooks/useCurrentUser"; -import { DUMMY_1 } from "@/constants"; import { NDKEvent } from "@nostr-dev-kit/ndk"; import { getTagValues } from "@/lib/nostr/utils"; -import LargeFeedCard from "@/components/Cards/CalendarEvent/LargeFeedCard"; +import LargeFeedCard, { + LoadingCard, +} from "@/components/Cards/CalendarEvent/LargeFeedCard"; + import { cn } from "@/lib/utils"; type CalendarSectionProps = { events: NDKEvent[]; @@ -43,6 +49,32 @@ export default function CalendarSection({ events }: CalendarSectionProps) { ); } +export function CalendarSectionLoading() { + const startDate = addMinutesToDate(new Date(), 60); + + return ( +
+ {/* Date Indicator */} +
+ +
+ {/* Date Indicator Mobile */} +
+
+ +
+
+ + {/* Events */} +
+ + + + +
+
+ ); +} function CalendarIcon({ date }: { date: Date }) { return (
+
+ +
+
+ ); + } + return (
diff --git a/components/Cards/CalendarEvent/LargeFeedCard.tsx b/components/Cards/CalendarEvent/LargeFeedCard.tsx index 2abd32b..82365bc 100644 --- a/components/Cards/CalendarEvent/LargeFeedCard.tsx +++ b/components/Cards/CalendarEvent/LargeFeedCard.tsx @@ -15,6 +15,8 @@ import AvatarStack from "@/components/ProfileContainers/AvatarStack"; import { NDKEvent } from "@nostr-dev-kit/ndk"; import { getTagValues, getTagAllValues } from "@/lib/nostr/utils"; import { HiOutlineMapPin, HiOutlineUserCircle } from "react-icons/hi2"; +import { Skeleton } from "@/components/ui/skeleton"; +import { AspectRatio } from "@/components/ui/aspect-ratio"; type LargeFeedCardProps = { event: NDKEvent; @@ -69,7 +71,7 @@ export default function LargeFeedCard({ event }: LargeFeedCardProps) {
-
+
{image ? ( ) : ( -
+
)}
); } + +export function LoadingCard() { + return ( + + +
+
+ + +
+
+ +
+ + + +
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+ ); +}