Skip to content
Snippets Groups Projects
Commit 5f74a774 authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

rename DownloadCSVProps to DownloadProps

parent 846a2b50
No related branches found
No related tags found
1 merge request!62added excel download button to the pages
This commit is part of merge request !62. Comments created here will be created in the context of that merge request.
......@@ -3,7 +3,7 @@ import * as XLSX from "xlsx";
import {ExportType} from "../helpers/constants";
interface DownloadCSVProps {
interface DownloadProps {
data: any[];
filename: string;
exportType: ExportType;
......@@ -56,7 +56,7 @@ function convertToExcel(jsonData: any[], sheetName = "Sheet1"): Blob {
return new Blob([buffer], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'});
}
const DownloadDataButton: React.FC<DownloadCSVProps> = ({data, filename, exportType}) => {
const DownloadDataButton: React.FC<DownloadProps> = ({data, filename, exportType}) => {
const downloadData = () => {
let convertedData;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment