Skip to content

Commit

Permalink
Merge pull request #1011 from oraichain/fix-export-csv
Browse files Browse the repository at this point in the history
update export csv
  • Loading branch information
haunv3 authored Feb 18, 2025
2 parents 2044bfc + 076d39c commit aae75ff
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/containers/ExportData/ExportData.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ExportData = props => {
const params = useParams();
const location = useLocation();
const account = params?.["account"];
const [disabledSubmit, setDisabledSubmit] = useState(true);
const [disabledSubmit, setDisabledSubmit] = useState(false);

const searchParams = new URLSearchParams(location.search);
const type = searchParams.get("type");
Expand Down Expand Up @@ -110,7 +110,7 @@ const ExportData = props => {
<CalendarIcon className={cx("calendar-icon")} />
</div>
</div>
<div className={cx("captcha-wrapper")}>
{/* <div className={cx("captcha-wrapper")}>
<ReCaptcha
size='normal'
data-theme='dark'
Expand All @@ -121,10 +121,24 @@ const ExportData = props => {
setDisabledSubmit(false);
}}
/>
</div>
</div> */}
<>
<div className={cx("random")}>
<button className={cx("button-random", disabledSubmit && "button-random-disabled")} onClick={disabledSubmit || download}>
<button
disabled={disabledSubmit}
className={cx("button-random", disabledSubmit && "button-random-disabled")}
onClick={async () => {
setDisabledSubmit(true);
try {
await download();
} catch (error) {
console.log({ error });
} finally {
setTimeout(() => {
setDisabledSubmit(false);
}, 3000);
}
}}>
Download
</button>
</div>
Expand Down

0 comments on commit aae75ff

Please sign in to comment.