From e56dc14a676f0d2896df67dde0ec7f8acc717d65 Mon Sep 17 00:00:00 2001
From: "narindra.rajohnso" <narindra-hasimanjaka-david.rajohnson@etu.hesge.ch>
Date: Fri, 2 Jun 2023 10:33:10 +0200
Subject: [PATCH] fix close modal alert bug

---
 Frontend/quizz-game/src/app/manage/manage.component.html     | 3 ++-
 .../questions/list-questions/list-questions.component.ts     | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Frontend/quizz-game/src/app/manage/manage.component.html b/Frontend/quizz-game/src/app/manage/manage.component.html
index 479cb1f..01f470f 100644
--- a/Frontend/quizz-game/src/app/manage/manage.component.html
+++ b/Frontend/quizz-game/src/app/manage/manage.component.html
@@ -201,8 +201,9 @@
               <span class="text-sm font-medium"> Details </span>
             </a>
 
-            <form action="/logout">
+            <form>
               <button
+                routerLink="/login/sign-in"
                 type="submit"
                 class="flex w-full items-center gap-2 rounded-lg px-4 py-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700"
               >
diff --git a/Frontend/quizz-game/src/app/manage/questions/list-questions/list-questions.component.ts b/Frontend/quizz-game/src/app/manage/questions/list-questions/list-questions.component.ts
index 2ea8fe9..c2897d4 100644
--- a/Frontend/quizz-game/src/app/manage/questions/list-questions/list-questions.component.ts
+++ b/Frontend/quizz-game/src/app/manage/questions/list-questions/list-questions.component.ts
@@ -63,13 +63,14 @@ export class ListQuestionsComponent implements OnInit, OnDestroy {
     this.modalQuestion=false;
     this.questionEdited=null;
     this.alertDelete=false;
-    if(value !== "error"){
+    if(value !== "error" && value !== undefined){
       this.alertSuccess=value;
       this.addSuccess=true;
       setTimeout(() => {
         this.addSuccess = false;
       }, 5000);
-    }else{
+    }
+    if(value === "error"){
       this.errorOccured=true;
       setTimeout(() => {
         this.errorOccured = false;
-- 
GitLab