diff --git a/pages/index.tsx b/pages/index.tsx index c7a226f1..c35bf6bf 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,3 @@ -import { ParsedUrlQuery } from "querystring"; - import { GetStaticProps } from "next"; import { MDXRemote } from "next-mdx-remote"; import React from "react"; @@ -9,6 +7,7 @@ import { DefaultLayout } from "@/components/DefaultLayout"; import { EmailSignup } from "@/components/EmailSignup"; import { EventDescriptionCard } from "@/components/EventDescriptionCard"; import { Image } from "@/components/Image"; +import { Link } from "@/components/Link"; import { NewsCard } from "@/components/NewsCard"; import { SocialLinks } from "@/components/SocialLinks"; import { Event, getUpcomingEvents } from "@/lib/events"; @@ -17,8 +16,9 @@ import { News, getRecentNews } from "@/lib/news"; import styles from "./index.module.css"; interface Props { - events: Event[]; - news: News[]; + numberOfEvents: number; // total number of upcoming events + events: Event[]; // array of 0 - 2 events + news: News; } export default function Home(props: Props) { @@ -48,52 +48,58 @@ export default function Home(props: Props) {
See past events here
++ See past events{" "} + + here + +
There are no upcoming events right now. Please check back later!
) : null}See more upcoming events here
+ {props.numberOfEvents > 2 ? ( ++ See more upcoming events{" "} + + here + +
) : null}
Updates from our execs!
- See past news here
+ See past news{" "}
+
+ here
+
There is no news right now. Please check back later!
- )} + }