diff --git a/client/src/components/ui/Skeleton.tsx b/client/src/components/ui/Skeleton.tsx index 98d9eee2f..afe1e064d 100644 --- a/client/src/components/ui/Skeleton.tsx +++ b/client/src/components/ui/Skeleton.tsx @@ -10,7 +10,7 @@ interface SkeletonProps { * Compose multiple elements to build page-level loading states. */ const Skeleton: React.FC = ({ className = "" }) => ( -
+
); export default Skeleton; diff --git a/client/src/pages/CreatorProfile.tsx b/client/src/pages/CreatorProfile.tsx index 96eb1ea6c..294871c5b 100644 --- a/client/src/pages/CreatorProfile.tsx +++ b/client/src/pages/CreatorProfile.tsx @@ -6,6 +6,7 @@ import RaffleCard from "../components/cards/RaffleCard"; import { mapListItemToCardProps } from "../services/raffleService"; import ErrorMessage from "../components/ui/ErrorMessage"; import { Spinner } from "../components/ui/Spinner"; +import Skeleton from "../components/ui/Skeleton"; const CreatorProfile: React.FC = () => { const { address } = useParams<{ address: string }>(); @@ -123,7 +124,7 @@ const CreatorProfile: React.FC = () => { {rafflesLoading && page === 0 ? (
{[1, 2, 3, 4].map((n) => ( -
+ ))}
) : rafflesError ? ( diff --git a/client/src/pages/MyRaffles.tsx b/client/src/pages/MyRaffles.tsx index a332c50ec..739fbe472 100644 --- a/client/src/pages/MyRaffles.tsx +++ b/client/src/pages/MyRaffles.tsx @@ -4,6 +4,7 @@ import { useWallet } from "../hooks/useWallet"; import { useUserProfile, useUserHistory } from "../hooks/useRaffles"; import ErrorMessage from "../components/ui/ErrorMessage"; import { Breadcrumbs } from "../components/ui/Breadcrumbs"; +import Skeleton from "../components/ui/Skeleton"; import type { ApiUserHistoryItem } from "../types/types"; // ── Status badge ────────────────────────────────────────────────────────────── @@ -196,7 +197,7 @@ const MyRaffles: React.FC = () => { return (
{[1, 2, 3].map((i) => ( -
+ ))}
); @@ -288,7 +289,7 @@ const MyRaffles: React.FC = () => {
)} {profileLoading && ( -
+ )} {/* Tabs */} diff --git a/client/src/pages/RaffleDetails.tsx b/client/src/pages/RaffleDetails.tsx index 0d2959d6d..da6a1577f 100644 --- a/client/src/pages/RaffleDetails.tsx +++ b/client/src/pages/RaffleDetails.tsx @@ -13,6 +13,7 @@ import EnterRaffleButton from "../components/EnterRaffleButton"; import detailimage from "../assets/detailimage.png"; import { Breadcrumbs } from "../components/ui/Breadcrumbs"; import { Helmet } from "react-helmet-async"; +import Skeleton from "../components/ui/Skeleton"; const RaffleDetails = () => { const { id } = useParams(); @@ -69,13 +70,13 @@ const RaffleDetails = () => { if (isLoading) { return (
-
-
-
-
-
-
-
+
+ + + + + +
); diff --git a/client/src/pages/RafflePage.tsx b/client/src/pages/RafflePage.tsx index 634ee521f..5445a86c1 100644 --- a/client/src/pages/RafflePage.tsx +++ b/client/src/pages/RafflePage.tsx @@ -22,6 +22,7 @@ import { Bell } from "lucide-react"; import AddToCalendar from "../components/ui/AddToCalendar"; +import Skeleton from "../components/ui/Skeleton"; import Line from "../assets/svg/Line"; import detailimage from "../assets/detailimage.png"; import { Breadcrumbs } from "../components/ui/Breadcrumbs"; @@ -29,10 +30,6 @@ import { Helmet } from "react-helmet-async"; import { useTranslation } from "react-i18next"; import { CountdownTimer } from "../components/ui/CountdownTimer"; -const Skeleton = ({ className }: { className?: string }) => ( -
-); - const RafflePage = () => { const { t } = useTranslation(); const { id } = useParams<{ id: string }>();