Skip to content

Commit

Permalink
added const for page limit for printing warning
Browse files Browse the repository at this point in the history
  • Loading branch information
prabh-t committed Oct 14, 2024
1 parent cf27aad commit 299f2cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/modal/DownloadModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 299f2cd

Please sign in to comment.