Skip to content

Commit 29f0cf8

Browse files
feat(tutor): handles noor feedback typo and modal
1 parent 740d617 commit 29f0cf8

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/components/ModalComponent.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { ref } from 'vue';
2+
import { ref, watch } from 'vue';
33
import ModalWrapper from './ModalWrapper.vue';
44
const props = defineProps<{
55
title: string;
@@ -10,6 +10,10 @@ const props = defineProps<{
1010
1111
const state = ref<boolean>(props.isOpen);
1212
13+
watch(isOpen, (val) => {
14+
state.value = val;
15+
});
16+
1317
const handleModalClose = () => {
1418
props.onClose();
1519
state.value = false;

src/components/ModalWrapper.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { computed } from 'vue';
33
const props = defineProps<{
44
isOpen: boolean;
5-
onClose: () => void;
5+
onClose?: () => void;
66
}>();
77
88
const computedState = computed(() => props.isOpen);
@@ -23,6 +23,7 @@ const handleModalClose = () => {
2323
data-testid="close"
2424
class="modal-close is-large"
2525
aria-label="close"
26+
v-if="onClose"
2627
@click="handleModalClose"
2728
></button>
2829
</div>

src/localisation/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export const en = {
210210
title: 'Documents to start with',
211211
description: 'Upload one or more documents to get started.',
212212
cursusTitleLabel: 'Cursus title',
213-
cursusTitlePlaceholder: 'Socilinguistics 101',
213+
cursusTitlePlaceholder: 'Sociolinguistics 101',
214214
cursusLevelLabel: 'Cursus level',
215215
cursusLevelPlaceholder: 'Undergraduate, Graduate, etc.',
216216
cursusDurationLabel: 'Cursus duration',

src/localisation/fr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export const fr = {
202202
wait: 'Veuillez patienter :',
203203
search: {
204204
title: 'Recherche de documents connexes',
205-
description: 'Chargment de vos documents et recherche de documents connexes en cours.'
205+
description: 'Chargement de vos documents et recherche de documents connexes en cours.'
206206
},
207207
syllabus: {
208208
title: 'Génération du syllabus',

src/views/TutorPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const stepToAction = {
7575
<div class="content-centered-wrapper">
7676
<StepsIndicator :step="step" :setStep="setStep" :stepsLength="3" />
7777

78-
<ModalWrapper v-if="isLoading" isOpen :onClose="() => {}">
78+
<ModalWrapper v-if="isLoading" :isOpen="isLoading">
7979
<div class="box loading-modal">
8080
<h1 class="title is-size-4 has-text-centered">
8181
{{ $t(loaderI18nPathText[step]?.title) }}

0 commit comments

Comments
 (0)