+
My Events
+ {events.isLoading ? (
+
+ ) : events.items.length > 0 ? (
+
+ {events.items.map((e) => (
+
+
+
+ ))}
+
+ ) : (
+
+ No assigned events
+
+ )}
);
}
diff --git a/client/src/app/PendingEvents.tsx b/client/src/app/PendingEvents.tsx
index 1979146..036923e 100644
--- a/client/src/app/PendingEvents.tsx
+++ b/client/src/app/PendingEvents.tsx
@@ -2,6 +2,7 @@
import AvailabilitySelector from "@/components/Event/AvailabilitySelector";
import Event from "@/components/Event/Event";
+import Loading from "@/components/Loading";
import { apiCall } from "@/lib";
import { EventAvailability } from "@/Zustand";
import { useAsyncList } from "@react-stately/data";
@@ -28,12 +29,25 @@ export default function PendingEvents() {
});
return (
-
- {events.items.map((e) => (
-
-
-
- ))}
+
+
+ Pending Events
+
+ {events.isLoading ? (
+
+ ) : events.items.length > 0 ? (
+
+ {events.items.map((e) => (
+
+
+
+ ))}
+
+ ) : (
+
+ No events with missing availability
+
+ )}
);
}
diff --git a/client/src/app/page.tsx b/client/src/app/page.tsx
index e1dba79..9977522 100644
--- a/client/src/app/page.tsx
+++ b/client/src/app/page.tsx
@@ -3,17 +3,9 @@ import PendingEvents from "./PendingEvents";
export default function Overview() {
return (
-
-
-
My Events
-
-
-
+
);
}
diff --git a/client/src/components/Event/EventEditor.tsx b/client/src/components/Event/EventEditor.tsx
index 4c9e86f..b564baa 100644
--- a/client/src/components/Event/EventEditor.tsx
+++ b/client/src/components/Event/EventEditor.tsx
@@ -15,12 +15,12 @@ import {
ModalContent,
ModalFooter,
ModalHeader,
- Spinner,
Textarea,
} from "@heroui/react";
import { EventData } from "@/Zustand";
import { useAsyncList } from "@react-stately/data";
import { getTasks } from "@/lib";
+import Loading from "../Loading";
export interface EventSubmitData {
eventID: number;
@@ -128,7 +128,7 @@ export default function EventEditor(props: {
))
) : (
-
+
)}
diff --git a/client/src/components/Loading.tsx b/client/src/components/Loading.tsx
new file mode 100644
index 0000000..fe7db1e
--- /dev/null
+++ b/client/src/components/Loading.tsx
@@ -0,0 +1,5 @@
+import { Spinner } from "@heroui/react";
+
+export default function Loading() {
+ return
;
+}