diff --git a/src/app/events/loading.tsx b/src/app/events/loading.tsx index 2b27efc..2b64d9c 100644 --- a/src/app/events/loading.tsx +++ b/src/app/events/loading.tsx @@ -1,5 +1,5 @@ -import { ListingPageLoading } from "@/components/page-loading"; +import { EventsPageLoading } from "@/components/page-loading"; export default function Loading() { - return ; + return ; } diff --git a/src/components/events/EventResultsSkeleton.tsx b/src/components/events/EventResultsSkeleton.tsx new file mode 100644 index 0000000..1a7f730 --- /dev/null +++ b/src/components/events/EventResultsSkeleton.tsx @@ -0,0 +1,32 @@ +export function EventResultsSkeleton() { + return ( +
+ در حال اعمال فیلترها و دریافت رویدادها… + +
+ ); +} diff --git a/src/components/page-loading.tsx b/src/components/page-loading.tsx index e6077e7..c009553 100644 --- a/src/components/page-loading.tsx +++ b/src/components/page-loading.tsx @@ -1,4 +1,5 @@ import { Skeleton } from "@/components/ui/skeleton"; +import { EventResultsSkeleton } from "@/components/events/EventResultsSkeleton"; export function BlogCardsSkeleton({ count = 6 }: { count?: number }) { return ( @@ -131,35 +132,27 @@ export function BlogDetailPageLoading() { ); } -export function ListingPageLoading() { +export function EventsPageLoading() { return (
-
- - -
- {Array.from({ length: 6 }).map((_, index) => ( -
- -
-
- - -
- -
- - - -
-
-
- ))} -
-
+
+ + +
+ + + +
+
); } diff --git a/src/views/Events.tsx b/src/views/Events.tsx index 32f6490..d0f96c8 100644 --- a/src/views/Events.tsx +++ b/src/views/Events.tsx @@ -8,6 +8,7 @@ import { Link } from "@/lib/router"; import { buildAuthPath } from "@/lib/auth-return"; import { Input } from "@/components/ui/input"; import { EventCard } from "@/components/events/EventCard"; +import { EventResultsSkeleton } from "@/components/events/EventResultsSkeleton"; import { EventFiltersDrawer } from "@/components/events/EventFiltersDrawer"; import type { EventBrowsePageSchema } from "@/lib/types"; import { api } from "@/lib/api"; @@ -34,37 +35,6 @@ function defaultFilters(search: string, priceCeiling: number): EventCatalogFilte }; } -function EventCardSkeleton() { - return ( - - ); -} - -function EventResultsSkeleton() { - return ( -
- در حال اعمال فیلترها و دریافت رویدادها… - -
- ); -} - function getPageNumbers(total: number, current: number): Array { if (total <= 7) return Array.from({ length: total }, (_, index) => index + 1);