diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 3411bba..47168a2 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -5,7 +5,6 @@ import logo from "/public/logo.svg" import { Footer } from "@/ui" import { Suspense } from "react" import Image from "next/image" -import { UsersSkeleton } from "@/ui/skeleton" const BASE_URL = process.env.API_URL diff --git a/frontend/src/components/swiper/SwiperUsers.tsx b/frontend/src/components/swiper/SwiperUsers.tsx index eda866e..54e4b82 100644 --- a/frontend/src/components/swiper/SwiperUsers.tsx +++ b/frontend/src/components/swiper/SwiperUsers.tsx @@ -6,8 +6,12 @@ import { User } from "@/interfaces/user" import Image from "next/image" import Link from "next/link" import "swiper/css" +import { useState } from "react" +import { UsersSkeleton } from "@/ui/skeleton/usersSkeleton" export function SwiperUsers({ users }: { users: User[] }) { + const [loading, setLoading] = useState(true); + return ( { users.map((user, i) => ( - + - foto + foto setLoading(false)} + />

{user.username}

+ {loading && ( + Array.from({ length: 2 }).map((_, i) => ( +
+
+
+
+ ) + ) + )} )) } - ) } + diff --git a/frontend/src/ui/skeleton/index.tsx b/frontend/src/ui/skeleton/index.tsx index 819f3f8..a201e02 100644 --- a/frontend/src/ui/skeleton/index.tsx +++ b/frontend/src/ui/skeleton/index.tsx @@ -1,2 +1 @@ -export { UsersSkeleton } from './usersSkeleton' export { AlbumFeedSkeleton } from './albumFeedSkeleton' \ No newline at end of file