diff --git a/src/components/audio-preview.tsx b/src/components/audio-preview.tsx index c1e499d..1158d19 100644 --- a/src/components/audio-preview.tsx +++ b/src/components/audio-preview.tsx @@ -5,8 +5,8 @@ import { QueryClientProvider, QueryClient, } from "@tanstack/react-query"; -import LoadingSpinner from "./loading-spinner"; import type { UsersTableType } from "@/server/db/schema"; +import { Button } from "@/components/ui/button"; const queryClient = new QueryClient(); @@ -19,7 +19,30 @@ const fetchUserData = async (): Promise => { return data; }; -function Player(props: { name: string }) { +function SkeletonLoader() { + return ( +
+
+
+
+ {/* Long Pill Skeleton */} +
+
+
+ {/* Button Skeleton */} +
+
+
+
+
+
+
+
+
+ ); +} + +function AudioInfo(props: { name: string }) { // Fetch user data using useQuery hook const { @@ -32,26 +55,45 @@ function Player(props: { name: string }) { }); if (isLoading) { - return Loading ...; + return ; } if (!userData?.whishperURL ?? error) { return

Failed to get whishper url

; } return ( - +
+
+
+
+
+
+
+ {/* Audio */} +
+ +
+
+
+
+
+
+
); } export default function AudioPreview({ name }: { name: string }) { return ( - + ); }