diff --git a/src/Components/Common/Export.tsx b/src/Components/Common/Export.tsx
index 7ddaca115bd..6714d8bdb08 100644
--- a/src/Components/Common/Export.tsx
+++ b/src/Components/Common/Export.tsx
@@ -39,6 +39,25 @@ export const ExportMenu = ({
}: ExportMenuProps) => {
const { isExporting, exportFile } = useExport();
+ if (exportItems.length === 1) {
+ const item = exportItems[0];
+
+ return (
+
+ exportFile(item.action, item.filePrefix, item.type, item.parse)
+ }
+ border
+ ghost
+ className="py-2.5"
+ >
+
+ {isExporting ? "Exporting..." : label}
+
+ );
+ }
+
return (
{
disabled={!isExportAllowed}
exportItems={[
{
- label:
- tabValue === 0
- ? "Live patients"
- : "Discharged patients",
+ label: "Export Live patients",
action: exportPatients(true),
parse: preventDuplicatePatientsDuetoPolicyId,
},
- {
- label: "All patients",
- action: exportPatients(false),
- parse: preventDuplicatePatientsDuetoPolicyId,
- },
]}
/>
)}