You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* function is called upon successfully deletion of user from the database.
21
21
*/
22
22
functionDeleteQuestionButton({
23
-
isQuestion,
24
-
text,
23
+
question,
25
24
removeRow,
26
25
}: DeleteQuestionButtonProps){
27
26
constnavigate=useNavigate();
28
27
29
28
const[isLoading,setLoading]=useState(false);
30
29
asyncfunctionhandleDelete(){
31
30
setLoading(true);
32
-
if(true){
33
-
// (await deleteQuestion(text)) {//if you comment this out it'll go to the login page but rn this never returns true bc theres no user created that it can delete
34
-
removeRow(text);
31
+
if(awaitdeleteQuestion(question)){
32
+
// if you comment this out it'll go to the login page but rn this never returns true bc theres no user created that it can delete
33
+
removeRow(question);
35
34
// go to new page just to check button functionality
0 commit comments