disable reference file input
This commit is contained in:
@@ -26,15 +26,15 @@ function Accuracy({ show }) {
|
||||
setLoading(true);
|
||||
setError(null); // Reset error state before making a new request
|
||||
|
||||
if (selectedFile) {
|
||||
if (!selectedFile) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', selectedFile);
|
||||
// formData.append('file', selectedFile);
|
||||
|
||||
const queryString = `start_date=${moment(startDate).format(
|
||||
'YYYY-MM-DD'
|
||||
)}&end_date=${moment(endDate).format('YYYY-MM-DD')}`;
|
||||
|
||||
const url = `https://asia-south1-hpos-af3cc.cloudfunctions.net/performance?${queryString}`;
|
||||
const url = `https://asia-south1-${process.env.REACT_APP_FIREBASE_PROJECT_ID}.cloudfunctions.net/performance?${queryString}`;
|
||||
|
||||
// Make a POST request using the Fetch API
|
||||
const response = await fetch(url, {
|
||||
@@ -79,10 +79,10 @@ function Accuracy({ show }) {
|
||||
return (
|
||||
<div>
|
||||
<h1>Auto Analysis</h1>
|
||||
<div className='file-row'>
|
||||
{/* <div className='file-row'>
|
||||
<div className='file-label'>Reference file</div>
|
||||
<input type="file" onChange={handleFileChange} />
|
||||
</div>
|
||||
</div> */}
|
||||
<div className='dates'>
|
||||
<div className='start-date'>
|
||||
<DatePicker selected={startDate} onChange={(date) => setStartDate(date)} placeholderText='start date' />
|
||||
|
||||
Reference in New Issue
Block a user