Skip to content

Commit

Permalink
fix: refresh quizzes when updating it
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoEscaleira committed Apr 27, 2024
1 parent 84062d9 commit 8adb5ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Quiz/QuizForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function QuizForm() {
onCompleted: async () => {
toast.success("Quiz updated successfully!");
},
refetchQueries: [GET_QUIZ_BY_ID],
refetchQueries: [GET_QUIZZES, GET_COUNTRY_QUIZZES, GET_QUIZ_BY_ID],
});

const onSubmit: SubmitHandler<z.infer<typeof quizFormSchema>> = async (values, event) => {
Expand Down
2 changes: 0 additions & 2 deletions src/pages/QuizResult/OtherUsersAttempts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export const OtherUsersAttempts = () => {
{hasQuizAttempts && (
<List className="flex flex-col p-0">
{quizAttempts?.attempts.map(({ id, percentage, minutes, seconds, user }, index) => {
console.log("user", user.id, userId);

if (user.id === userId) return null;

return (
Expand Down

0 comments on commit 8adb5ea

Please sign in to comment.