Skip to content

Commit

Permalink
rounded border for pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
imyanice committed Oct 31, 2024
1 parent 8bec1aa commit ce75648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function App() {
viewport: viewport,
};
await page.render(renderContext).promise;
return canvas.toDataURL();
return canvas.toDataURL("image/jpeg");
};

const handleFileClick = async (file: File) => {
Expand Down Expand Up @@ -270,9 +270,9 @@ function App() {
>
{file.name.endsWith(".pdf") ? (
<img
className="rounded-3xl w-32 p-4"
draggable={false}
src={pdfImages[file.name] || fileImage}
className="w-32 p-4"
alt="PDF preview"
/>
) : (
Expand Down

0 comments on commit ce75648

Please sign in to comment.