Skip to content

Commit

Permalink
types fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Ainapure committed Nov 10, 2024
1 parent e0a64ff commit 27a1779
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 974 deletions.
2 changes: 1 addition & 1 deletion frontend/dev-dist/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ define(['./workbox-56da8dea'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
"revision": "0.p4l2jp7sac"
"revision": "0.ga61squ3cfo"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
Expand Down
1,231 changes: 265 additions & 966 deletions frontend/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@types/node": "^22.0.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
Expand Down
1 change: 0 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Particles from "@/components/magicui/particles";
import Meteors from "@/components/magicui/meteors";
import Events from "./appComponents/Events";
import Popup from "./appComponents/Popup";
import ClubRegistration from "./appComponents/ClubRegistration";
import ClubLogin from "./appComponents/ClubLogin";
import { ClubAdmin } from "./appComponents/ClubAdmin";
import "./App.css";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/appComponents/ClubRegistration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const addClub = async (newClub: Club): Promise<Club> => {
return response.data;
};

const ClubRegistration: React.FC<any> = ({ onClose, handleClosePopup }) => {
const ClubRegistration: React.FC<any> = ({ onClose }) => {
const navigate = useNavigate();
const [displayModal, setDisplayModal] = useState(false);
const [hidden, setHidden] = useState(true);
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/appComponents/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ const Events = () => {
const [events, setEvents] = useState([]);
const isHomePage = window.location.pathname === "/";

const formatTimeRange = (startDateTime: any, endDateTime: any) => {
const formatTimeRange = ( endDateTime: any) => {
// Convert the strings to Date objects
let start = new Date(startDateTime);
let end = new Date(endDateTime);

// Array of month names
Expand Down Expand Up @@ -99,7 +98,7 @@ const Events = () => {
key={event.EventID}
name={event.EventName}
description={event.Description}
time={formatTimeRange(event.StartDateTime, event.EndDateTime)}
time={formatTimeRange(event.EndDateTime)}
/>
))}
</div>
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/appComponents/Popup.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import ClubRegistration from './ClubRegistration';

function Popup({ onClose }: any) {
const [showRegistrationPage, setShowRegistrationPage] = useState(false);
const [isOpen, setIsOpen] = useState(false); // Start with the popup closed
const navigate = useNavigate();

useEffect(() => {
// Show the popup after 3 seconds (3000 milliseconds)
Expand Down

0 comments on commit 27a1779

Please sign in to comment.