From 299f2cdb4ffa2c922984a970a59e087958d881b7 Mon Sep 17 00:00:00 2001 From: prabhat Date: Mon, 14 Oct 2024 15:01:33 +0100 Subject: [PATCH] added const for page limit for printing warning --- src/ui/modal/DownloadModal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/modal/DownloadModal.tsx b/src/ui/modal/DownloadModal.tsx index 7c4d660..094db90 100644 --- a/src/ui/modal/DownloadModal.tsx +++ b/src/ui/modal/DownloadModal.tsx @@ -29,6 +29,8 @@ interface DownloadModalProps { numPages: number } +const NUM_PAGES_LIMIT = 10; + // could be triggered for // - id input params: id, page, pageSize, assembly // - protien acc params: same as above except id is accession @@ -94,7 +96,7 @@ function DownloadModal(props: DownloadModalProps) { const handleSubmit = () => { - if (!currPage && props.numPages > 20) { + if (!currPage && props.numPages > NUM_PAGES_LIMIT) { var confirm = window.confirm(`Are you sure you want to download all ${props.numPages} pages?\nThis may take a long time to generate.`); if (!confirm) { return;