fix: progress report bugs

This commit is contained in:
Rotimi Best
2024-10-10 19:24:47 +01:00
parent 7cdb2281e1
commit 802b4092b9
2 changed files with 4 additions and 6 deletions
@@ -30,7 +30,7 @@
}) })
.finally(() => { .finally(() => {
isDownloading = false; isDownloading = false;
$openModal.showFullscreenButton = true; $openModal.showFullscreenButton = false;
}); });
}, 300); }, 300);
} else { } else {
@@ -28,16 +28,14 @@ export const openModal: Writable<OpenModal> = writable({
avatar: false, avatar: false,
background: false, background: false,
fullscreen: false, fullscreen: false,
showFullscreenButton: true, showFullscreenButton: false,
mood: false mood: false
}); });
const placeholderLearning = 'Tell us what you are learning';
// report html // report html
export const htmlBody: Writable<HtmlBody> = writable({ export const htmlBody: Writable<HtmlBody> = writable({
name: '', name: '',
learning: placeholderLearning, learning: '',
progress: 10, progress: 10,
avatar: '', avatar: '',
background: '', background: '',
@@ -51,7 +49,7 @@ export const htmlBody: Writable<HtmlBody> = writable({
export const isFormComplete = derived(htmlBody, ($htmlBody) => { export const isFormComplete = derived(htmlBody, ($htmlBody) => {
return !!( return !!(
$htmlBody.name.trim() && $htmlBody.name.trim() &&
$htmlBody.learning.trim() !== placeholderLearning && $htmlBody.learning.trim() &&
$htmlBody.progress > 0 && $htmlBody.progress > 0 &&
$htmlBody.mood.text.trim() && $htmlBody.mood.text.trim() &&
$htmlBody.mood.iconSrc.trim() $htmlBody.mood.iconSrc.trim()