Skip to content

Commit

Permalink
fix: format failed to get document text
Browse files Browse the repository at this point in the history
  • Loading branch information
aamirazad committed Jul 6, 2024
1 parent e5a70b1 commit ae9ae32
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/document-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,16 @@ function DocumentViewer(props: { id: number }) {
return <SkeletonLoader />;
}

if (!pdfUrl) {
return <h1>Failed to get document</h1>;
if (pdfUrl) {
return (
<div className="flex justify-center">
<div className="mx-auto max-w-sm rounded-lg bg-black p-4 shadow-md">
<h1 className="w-full text-center text-2xl font-bold">
Failed to get document
</h1>
</div>
</div>
);
}

return (
Expand Down

0 comments on commit ae9ae32

Please sign in to comment.