| 1 | "use client"; |
| 2 | |
| 3 | import { Progress } from "@/components/ui/progress"; |
| 4 | |
| 5 | interface UploadProgressProps { |
| 6 | isUploading: boolean; |
| 7 | progress: number; |
| 8 | } |
| 9 | |
| 10 | export function UploadProgress({ isUploading, progress }: UploadProgressProps) { |
| 11 | if (!isUploading) return null; |
| 12 | |
| 13 | return ( |
| 14 | <div className="space-y-2"> |
| 15 | <div className="text-sm text-muted-foreground">Uploading image...</div> |
| 16 | <div className="flex items-center gap-3"> |
| 17 | <Progress value={progress} className="flex-1" /> |
| 18 | <span className="w-12 text-right text-xs text-muted-foreground"> |
| 19 | {Math.round(progress)}% |
| 20 | </span> |
| 21 | </div> |
| 22 | </div> |
| 23 | ); |
| 24 | } |
| 25 |