diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 5605a4d..8928ce1 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -46,7 +46,9 @@ const Community = async () => {
-

Community Events

+

+ Community Events +

diff --git a/src/components/CommunityEvents.tsx b/src/components/CommunityEvents.tsx index 90c051e..f218a19 100644 --- a/src/components/CommunityEvents.tsx +++ b/src/components/CommunityEvents.tsx @@ -10,15 +10,15 @@ type Event = SelectEvent & { description: string; image: string; tags: string[]; - approved: "approved" | "rejected" | "pending"; + approved: 'approved' | 'rejected' | 'pending'; profileImage: string | null; soc: boolean; - } -} + }; +}; type Props = { events: Event[]; -} +}; const CommunityEvents = ({ events }: Props) => { if (events.length == 0) { diff --git a/src/components/InfiniteScrollGrid.tsx b/src/components/InfiniteScrollGrid.tsx index 6883567..770ef13 100644 --- a/src/components/InfiniteScrollGrid.tsx +++ b/src/components/InfiniteScrollGrid.tsx @@ -57,11 +57,7 @@ export default function InfiniteScrollGrid({ session, tag }: Props) { ref={isLastElement ? lastOrgElementRef : null} key={club.id} > - +
); }), diff --git a/src/components/OrgDirectoryCarousel.tsx b/src/components/OrgDirectoryCarousel.tsx index 20eae73..7800d15 100644 --- a/src/components/OrgDirectoryCarousel.tsx +++ b/src/components/OrgDirectoryCarousel.tsx @@ -8,61 +8,74 @@ import { LeftArrowIcon, RightArrowIcon } from '@src/icons/Icons'; import ClubCard from './club/ClubCard'; type Props = { - clubs: SelectClub[], - session?: Session -} + clubs: SelectClub[]; + session?: Session; +}; const OrgDirectoryCarousel: FC = ({ clubs, session }) => { - const [currentIndex, setCurrentIndex] = useState(0); - const clubCard = useRef(null); - const clubCardElement: HTMLDivElement = clubCard.current!; - let clubCardWidth = 0; - if (clubCardElement) { - clubCardWidth = clubCardElement.scrollWidth; - } + const [currentIndex, setCurrentIndex] = useState(0); + const clubCard = useRef(null); + const clubCardElement: HTMLDivElement = clubCard.current!; + let clubCardWidth = 0; + if (clubCardElement) { + clubCardWidth = clubCardElement.scrollWidth; + } - function prev() { - setCurrentIndex(currentIndex - 1); - } + function prev() { + setCurrentIndex(currentIndex - 1); + } - function next() { - setCurrentIndex(currentIndex + 1); - } + function next() { + setCurrentIndex(currentIndex + 1); + } - if (session) { - return ( -
- { -
- {currentIndex > 0 && - - } - {currentIndex < clubs.length - 1 && - - } -
- } -
-
-
- {clubs.map((club) => ( -
- -
- ))} -
-
+ if (session) { + return ( +
+ { +
+ {currentIndex > 0 && ( + + )} + {currentIndex < clubs.length - 1 && ( + + )} +
+ } +
+
+
+ {clubs.map((club) => ( +
+
+ ))}
- ) - } -} +
+
+
+ ); + } +}; -export default OrgDirectoryCarousel; \ No newline at end of file +export default OrgDirectoryCarousel;