Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file ovewrite handling for CSV save #75

Merged
merged 4 commits into from
Oct 13, 2023
Merged

Add file ovewrite handling for CSV save #75

merged 4 commits into from
Oct 13, 2023

Conversation

jojortz
Copy link
Collaborator

@jojortz jojortz commented Oct 5, 2023

  • add /file_exists/ route to application.py to check if file exists
  • implement dialog to check if user wants to overwrite existing file in DownloadModal component

@jojortz jojortz requested a review from CambioML October 5, 2023 22:08
@@ -34,6 +34,19 @@
}
};

const handleSubmit = async (e) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!. May be worth destucturing the file_exists directly, since we're just using file_exists there
e.g.
const { file_exists } = await response.json();

then

    if (file_exists) {
        ...
    } else {
        ...
    }
};

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated with this!

@goldmermaid
Copy link
Collaborator

LGTM! Good work!

@goldmermaid goldmermaid merged commit 552eaa2 into main Oct 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants