diff --git a/src/components/document-preview.tsx b/src/components/document-preview.tsx index 1d5d2e6..78a169e 100644 --- a/src/components/document-preview.tsx +++ b/src/components/document-preview.tsx @@ -5,7 +5,6 @@ import { QueryClientProvider, QueryClient, } from "@tanstack/react-query"; -import type { AdviceAPIType } from "@/types"; import type { UsersTableType } from "@/server/db/schema"; import { Button, buttonVariants } from "@/components/ui/button"; import { ChevronLeft } from "lucide-react"; @@ -40,30 +39,11 @@ export async function getPaperlessThumbnail( } function SkeletonLoader() { - const { data: advice, isLoading } = useQuery({ - queryKey: ["advice"], - queryFn: async () => { - const response = await fetch("https://api.adviceslip.com/advice"); - return (await response.json()) as AdviceAPIType; - }, - }); - return ( -
- {/* PDF Skeleton */} -
+
+
{/* Pulsing Background */} -
- {/* Text Overlay */} -
-
- {isLoading - ? "Loading advice..." - : advice?.slip.advice === null - ? "Unable to fetch advice" - : advice?.slip.advice} -
-
+
);