From ec04bf14b2a40ef7fb70eec1ab0e6f34840b22fe Mon Sep 17 00:00:00 2001 From: Yash-Ainapure Date: Sun, 13 Oct 2024 11:12:41 +0530 Subject: [PATCH] removed type errors --- frontend/src/appComponents/ClubAdmin.tsx | 1 - frontend/src/appComponents/ViewEvent.tsx | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/src/appComponents/ClubAdmin.tsx b/frontend/src/appComponents/ClubAdmin.tsx index c8534e4..73b58c4 100644 --- a/frontend/src/appComponents/ClubAdmin.tsx +++ b/frontend/src/appComponents/ClubAdmin.tsx @@ -12,7 +12,6 @@ import { motion } from "framer-motion"; import { cn } from "@/lib/utils"; import { useAuth } from "../context/AuthContext"; import { Routes, Route } from "react-router-dom"; -import Events from "./Events"; import QuizCreation from "./QuizCreation"; import AdminResults from "./AdminResults"; import EventCreation from "./EventCreation"; diff --git a/frontend/src/appComponents/ViewEvent.tsx b/frontend/src/appComponents/ViewEvent.tsx index ccbd04b..7603b8f 100644 --- a/frontend/src/appComponents/ViewEvent.tsx +++ b/frontend/src/appComponents/ViewEvent.tsx @@ -1,4 +1,4 @@ -import { useNavigate, useParams,useHistory } from 'react-router-dom'; +import { useNavigate, useParams } from 'react-router-dom'; import { useState, useEffect } from 'react'; import axiosInstance from './axiosInstance'; @@ -7,9 +7,8 @@ import axiosInstance from './axiosInstance'; const ViewEvent = () => { const { id } = useParams<{ id: string }>(); const [eventData, setEventData] = useState(null); - const history = useHistory(); - // const navigate = useNavigate(); + const navigate = useNavigate(); useEffect(() => { const fetchEventData = async () => { try { @@ -28,9 +27,8 @@ const ViewEvent = () => { if (eventData === null) return
Loading...
return (
- ViewEvent