@local-civics/hub-ui 0.1.116 → 0.1.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4221,10 +4221,12 @@ const LearningForm = (props) => {
4221
4221
  autoSave(isDraft, props.onSaveDraft, () => setIsDraft(false)),
4222
4222
  [isDraft]
4223
4223
  );
4224
- const saveVisibility = isDraft || props.stopWatchStarted ? "opacity-100 visible" : "opacity-0 invisible";
4224
+ const elapsedTime = (props == null ? void 0 : props.elapsedTime) || 0;
4225
+ const timeSpent = (props == null ? void 0 : props.timeSpent) || 0;
4226
+ const saveVisibility = isDraft ? "opacity-100 visible" : "opacity-0 invisible";
4225
4227
  const answers = [];
4226
4228
  const saveDraft = async () => {
4227
- if (!isDraft) {
4229
+ if (!isDraft && elapsedTime <= timeSpent) {
4228
4230
  return;
4229
4231
  }
4230
4232
  return props.onSaveDraft && props.onSaveDraft(answers, reflection, rating).then((e) => !e && setIsDraft(false));