Skip to content

Commit

Permalink
fix: Fixed build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsheel12 committed Jul 17, 2024
1 parent da120c3 commit 969c1ef
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions web/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ import { Autoplay, Pagination } from "swiper/modules";
import SponsorCard from "../components/SponsorCard";
import axios from "axios";
import { useEffect, useState } from "react";
import { EventType, SponsorType } from "../utils/FrontendTypes";
import { SponsorType } from "../utils/FrontendTypes";

export default function Home() {
const [events, setEvents] = useState<EventType[]>([]);
// const [events, setEvents] = useState<EventType[]>([]);
const [sponsors, setSponsors] = useState<SponsorType[]>([]);

useEffect(() => {
async function fetchEvents() {
try {
const response = await axios.get("http://localhost:4000/api/events/");
setEvents(response.data);
} catch (error) {
console.error("Error fetching event data", error);
}
}
// async function fetchEvents() {
// try {
// const response = await axios.get("http://localhost:4000/api/events/");
// setEvents(response.data);
// } catch (error) {
// console.error("Error fetching event data", error);
// }
// }
async function fetchSponsors() {
try {
const response = await axios.get("http://localhost:4000/api/sponsors/");
Expand All @@ -38,7 +38,7 @@ export default function Home() {
}

fetchSponsors();
fetchEvents();
// fetchEvents();
}, []);

return (
Expand Down

0 comments on commit 969c1ef

Please sign in to comment.