File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
peerprep-fe/src/app/admin Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import { useQuestionStore } from '@/state/useQuestionStore';
12
12
13
13
function AdminPage ( ) {
14
14
const { dialogOpen, toggleDialogOpen } = useQuestionStore ( ) ;
15
-
16
15
const [ informationDialog , setInformationDialog ] = useState ( '' ) ;
17
16
const {
18
17
problems,
@@ -42,7 +41,7 @@ function AdminPage() {
42
41
if ( res . status !== 200 ) {
43
42
throw new Error ( 'Failed to delete problem' ) ;
44
43
}
45
- fetchProblems ( 1 , false ) ;
44
+ await fetchProblems ( 1 , false ) ;
46
45
return res ;
47
46
} ;
48
47
@@ -61,7 +60,7 @@ function AdminPage() {
61
60
title : problem . title ,
62
61
} ) ;
63
62
64
- fetchProblems ( 1 , false ) ;
63
+ await fetchProblems ( 1 , false ) ;
65
64
return res ;
66
65
} catch ( e : unknown ) {
67
66
if ( isAxiosError ( e ) ) {
@@ -99,7 +98,7 @@ function AdminPage() {
99
98
title : problem . title ,
100
99
} ) ;
101
100
102
- fetchProblems ( 1 , false ) ;
101
+ await fetchProblems ( 1 , false ) ;
103
102
toggleDialogOpen ( ) ;
104
103
return res ;
105
104
} catch ( e : unknown ) {
You can’t perform that action at this time.
0 commit comments