Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
StartupFairBanner,
ProductStudioBanner,
} from "../components/Banner";
import { useEffect, useState } from "react";
// import { StartupFairBanner } from "../components/Banner";

const TenX = () => (
Expand All @@ -22,6 +23,22 @@ const TenX = () => (
);

export default function IndexPage() {
const [year, setYear] = useState("2025");

useEffect(() => {
// fetch the year from advanced getyear api
fetch("https://getfullyear.com/api/year")
.then((response) => response.json())
.then((data) => {
if (data?.year) {
setYear(data.year);
}
})
.catch((error) => {
console.error("Error fetching year:", error);
});
}, []);

return (
<main>
<Head title="University of Michigan" />
Expand Down Expand Up @@ -97,7 +114,7 @@ export default function IndexPage() {

<div className="bg-gradient-to-r from-gray-900 to-black">
<p className="footer text-gray-200 text-center font-semibold py-8">
&copy; 2024 V1 @ Michigan |{" "}
&copy; {year} V1 @ Michigan |{" "}
<a href="mailto:team@v1michigan.com">team@v1michigan.com</a>
</p>
</div>
Expand Down
Loading