fix: hide timer instructions if duration is not set

This commit is contained in:
Jannat Patel
2024-10-14 15:49:27 +05:30
parent f33e950e83
commit a9cb52c68b

View File

@@ -1,21 +1,21 @@
<template> <template>
<div v-if="quiz.data"> <div v-if="quiz.data">
<div <div
class="bg-blue-100 space-y-2 py-2 px-2 rounded-md text-sm text-blue-800" class="bg-blue-100 space-y-1 py-2 px-2 rounded-md text-sm text-blue-800"
> >
<div class="leading-5"> <div class="leading-5">
{{ {{
__('This quiz consists of {0} questions.').format(questions.length) __('This quiz consists of {0} questions.').format(questions.length)
}} }}
</div> </div>
<div class="leading-5"> <div v-if="quiz.data?.duration" class="leading-5">
{{ {{
__( __(
'Please ensure that you complete all the questions in {0} minutes.' 'Please ensure that you complete all the questions in {0} minutes.'
).format(quiz.data.duration) ).format(quiz.data.duration)
}} }}
</div> </div>
<div class="leading-5"> <div v-if="quiz.data?.duration" class="leading-5">
{{ {{
__( __(
'If you fail to do so, the quiz will be automatically submitted when the timer ends.' 'If you fail to do so, the quiz will be automatically submitted when the timer ends.'