merge
This commit is contained in:
19
src/components/ExportData.js
Normal file
19
src/components/ExportData.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import './ExportData.css';
|
||||
|
||||
function ExportData({ url, show }) {
|
||||
const [startDate, setStartDate] = useState("");
|
||||
const [endDate, setEndDate] = useState("");
|
||||
|
||||
const fetchFile = (start_date, end_date) => {
|
||||
window.location.href = "https://asia-south1-hpos-af3cc.cloudfunctions.net/consolidation?start_date=2023-08-20&end_date=2023-08-21"
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className='button' onClick={() => fetchFile(startDate, endDate)}>Download Excel</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default ExportData;
|
||||
Reference in New Issue
Block a user