Open UdaySagar-Git opened 3 months ago
no need redirects itself
also it creates a bug if user directly clicks view leaderboard then the user current quiz record cant be sent into backend
manage quiz fetches only current users quizes by default (no change to make )
useEffect(() => { const getQuizzes = async () => { const res = await axios.post("/api/get-quizzes-created", { userId: currentUser?.id, }); setQuizzes(res.data); }; getQuizzes(); }, []);