Skip to content

Commit c76d4c2

Browse files
authored
Merge pull request #180 from CS3219-AY2425S1/fix/cleanup_features
Forgot to git add admin page
2 parents 928a77b + f1db4b2 commit c76d4c2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

peerprep-fe/src/app/admin/page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { useQuestionStore } from '@/state/useQuestionStore';
1212

1313
function 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) {

0 commit comments

Comments
 (0)