Skip to content

Commit 1d8e90b

Browse files
committed
fix: Year
1 parent 78b38af commit 1d8e90b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/app/_components/Recruitment.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { fetchRecruitment } from "@/components/shared/hooks/api/useRecruitment"
22
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
33
import { UserRoundIcon } from "lucide-react"
4+
import { DateTime } from "luxon"
45
import Link from "next/link"
56

67
export async function RecruitmentBanner() {
@@ -18,7 +19,7 @@ export async function RecruitmentBanner() {
1819
<UserRoundIcon className="h-4 w-4" />
1920
<AlertTitle>Recruitment open!</AlertTitle>
2021
<AlertDescription>
21-
Apply to become a part of Armada 2024
22+
Apply to become a part of Armada {DateTime.now().year}
2223
</AlertDescription>
2324
</Alert>
2425
</Link>

src/app/student/layout.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { NavigationMenu } from "@/components/shared/NavigationMenu"
22
import { fetchRecruitment } from "@/components/shared/hooks/api/useRecruitment"
33
import { Button } from "@/components/ui/button"
4+
import { DateTime } from "luxon"
45
import Link from "next/link"
56

67
export default async function ExhibitorLayout({
@@ -22,7 +23,8 @@ export default async function ExhibitorLayout({
2223
<>
2324
<NavigationMenu
2425
aside={
25-
<Link href="https://ais.armada.nu/fairs/2024/recruitment">
26+
<Link
27+
href={`https://ais.armada.nu/fairs/${DateTime.now().year}/recruitment`}>
2628
<Button variant={"outline"}>Apply for Armada</Button>
2729
</Link>
2830
}

src/app/student/map/page.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { LocationId, locations } from "@/app/student/map/lib/locations"
88
import { feature } from "@/components/shared/feature"
99
import { fetchExhibitors } from "@/components/shared/hooks/api/useExhibitors"
10+
import { DateTime } from "luxon"
1011
import { Metadata } from "next"
1112
import { notFound } from "next/navigation"
1213
import { Suspense } from "react"
@@ -22,7 +23,7 @@ export default async function Page() {
2223
}
2324

2425
const exhibitors = await fetchExhibitors({
25-
year: 2024,
26+
year: DateTime.now().year,
2627
next: { revalidate: 3600 / 3 /* 20 min */ }
2728
})
2829

src/app/student/recruitment/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const metadata: Metadata = {
2323
export default async function RecruitmentPage() {
2424
const data = await fetchRecruitment({
2525
next: {
26-
revalidate: 3600 * 3 // 3 hours
26+
revalidate: 3600 * 24 // once a day
2727
}
2828
})
2929

0 commit comments

Comments
 (0)