Skip to content

Commit

Permalink
Refactor PDF download button in OccupancyModal component
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinashe-Austin committed Sep 30, 2024
1 parent d4f5ca3 commit 6f7870a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/occupi-web/src/components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
} from "@react-pdf/renderer";
import { occupiLogo } from "@assets/index"; // Assuming occupiLogo is an image asset
import NotificationService from "NotificationsService";
import React from "react";

interface User {
id: string;
Expand Down Expand Up @@ -345,13 +344,13 @@ export default function OccupancyModal({ user }: OccupancyModalProps) {
document={generateReportPDF()}
fileName={`${user.name}_Stats_Report.pdf`}
>
{({ loading }) => (
{/* {({ loading }) => (
<React.Fragment>
{loading
? "Report is loading..."
: "Report ready to download"}
</React.Fragment>
)}
)} */}
</PDFDownloadLink>
</Button>
) : (
Expand Down

0 comments on commit 6f7870a

Please sign in to comment.