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';
1212
1313function AdminPage ( ) {
1414 const { dialogOpen, toggleDialogOpen } = useQuestionStore ( ) ;
15-
1615 const [ informationDialog , setInformationDialog ] = useState ( '' ) ;
1716 const {
1817 problems,
@@ -42,7 +41,7 @@ function AdminPage() {
4241 if ( res . status !== 200 ) {
4342 throw new Error ( 'Failed to delete problem' ) ;
4443 }
45- fetchProblems ( 1 , false ) ;
44+ await fetchProblems ( 1 , false ) ;
4645 return res ;
4746 } ;
4847
@@ -61,7 +60,7 @@ function AdminPage() {
6160 title : problem . title ,
6261 } ) ;
6362
64- fetchProblems ( 1 , false ) ;
63+ await fetchProblems ( 1 , false ) ;
6564 return res ;
6665 } catch ( e : unknown ) {
6766 if ( isAxiosError ( e ) ) {
@@ -99,7 +98,7 @@ function AdminPage() {
9998 title : problem . title ,
10099 } ) ;
101100
102- fetchProblems ( 1 , false ) ;
101+ await fetchProblems ( 1 , false ) ;
103102 toggleDialogOpen ( ) ;
104103 return res ;
105104 } catch ( e : unknown ) {
You can’t perform that action at this time.
0 commit comments