diff --git a/app/api/event1/joinTeam/route.js b/app/api/event1/joinTeam/route.js index 738d754..c4351a6 100644 --- a/app/api/event1/joinTeam/route.js +++ b/app/api/event1/joinTeam/route.js @@ -59,7 +59,7 @@ export async function POST(req, { params }) { await Users.findOneAndUpdate( { _id: userId }, - { $set: { teamId: team.id, teamRole: 1 } } + { $set: { event1TeamId: team.id, event1TeamRole: 1 } } ); await Event1.findOneAndUpdate( diff --git a/app/events/event1/leaderDash/page.jsx b/app/events/event1/leaderDash/page.jsx index 0542df0..29530b2 100644 --- a/app/events/event1/leaderDash/page.jsx +++ b/app/events/event1/leaderDash/page.jsx @@ -9,6 +9,7 @@ import { useSession } from 'next-auth/react'; import { useRouter } from 'next/navigation'; import toast, { Toaster } from 'react-hot-toast'; import Link from 'next/link'; +import DeleteTeamButton from '@/components/DeleteTeamButton'; export default function LeaderDashboard() { const [popUpForDelete, setPopUpForDelete] = useState(false); @@ -237,7 +238,8 @@ export default function LeaderDashboard() { > Start Quiz */} - {/* deleteTeam()} /> */} + + deleteTeam()} /> {isQualified && (
diff --git a/components/DeleteTeamButton.jsx b/components/DeleteTeamButton.jsx new file mode 100644 index 0000000..2d330e1 --- /dev/null +++ b/components/DeleteTeamButton.jsx @@ -0,0 +1,14 @@ +import React from 'react'; + +const DeleteTeamButton = ({ onClick }) => { + return ( + + ); +}; + +export default DeleteTeamButton;