Skip to content

Commit

Permalink
fix: student unable to view exercise (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
rotimi-best authored Jan 20, 2024
1 parent a1dcc0e commit d866827
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
$: browser && !alreadyCheckedAutoSavedData && getAutoSavedData();
// Reactive code
$: if (alreadyCheckedAutoSavedData && $questionnaire.questions.length > 2) {
$: if (alreadyCheckedAutoSavedData && $questionnaire.questions.length > 0) {
currentQuestion = $questionnaire.questions[$questionnaireMetaData.currentQuestionIndex - 1];
if ($questionnaireMetaData.currentQuestionIndex > 0 && !currentQuestion) {
$questionnaireMetaData.isFinished = true;
Expand Down
20 changes: 4 additions & 16 deletions apps/dashboard/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<title>ClassroomIO - The classroom software</title>
</svelte:head>

<div class="root w-screen flex items-center justify-center flex-col m-2 sm:m-0">
<div class="md:h-[93vh] w-screen flex items-center justify-center flex-col m-2 sm:m-0 font-sans">
<!--
<img
src="/logo-192.png"
Expand All @@ -69,7 +69,7 @@
</p>
</div>

<form on:submit|preventDefault={handleSubmit} class="my-4">
<form on:submit|preventDefault={handleSubmit} class="my-4 hidden">
<div class="flex items-center flex-col sm:flex-row">
{#if success}
<p class="dark:text-white">You have been added successfully. Thanks for joining.</p>
Expand All @@ -87,10 +87,10 @@
</div>
</form>

<div class="flex flex-col md:flex-row">
<div class="flex flex-col md:flex-row mt-4">
{#each areas as area, index}
<div
class="box m-3 bg-white dark:bg-black rounded-md py-3 px-12 active shadow-xl border-2 hover:border-primary-700 {animate}"
class="max-w-[350px] m-3 bg-white dark:bg-black rounded-md py-3 px-12 active shadow-xl border-2 hover:border-primary-700 {animate}"
>
<h3 class="dark:text-white text-3xl">
{#if index === 0}
Expand All @@ -107,15 +107,3 @@
{/each}
</div>
</div>

<style>
.box {
max-width: 350px;
}
@media (min-width: 640px) {
.root {
height: 93vh;
}
}
</style>

0 comments on commit d866827

Please sign in to comment.