maryvilledev / codesplainUI

Web app for breaking down and annotating Python 3 source code.
https://www.codesplain.io
GNU General Public License v3.0
2 stars 2 forks source link

Saving an annotation will trigger a save to S3 when snippetKey is presetn #387

Closed solkaz closed 7 years ago

solkaz commented 7 years ago

Description

This PR refactors the handleSaveAnnotation method of the Annotation container component to add a check for the snippetKey prop. If it is non-empty, then an action will be dispatched to save the snippet state to S3. If it is empty (i.e. the snippet hasn't been saved yet) then the action to save to S3 won't be dispatched.

Motivation and Context

Fixes #373

Checklist:

Screenshots (if appropriate):