File tree 4 files changed +8
-4
lines changed
4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { fetchRecruitment } from "@/components/shared/hooks/api/useRecruitment"
2
2
import { Alert , AlertDescription , AlertTitle } from "@/components/ui/alert"
3
3
import { UserRoundIcon } from "lucide-react"
4
+ import { DateTime } from "luxon"
4
5
import Link from "next/link"
5
6
6
7
export async function RecruitmentBanner ( ) {
@@ -18,7 +19,7 @@ export async function RecruitmentBanner() {
18
19
< UserRoundIcon className = "h-4 w-4" />
19
20
< AlertTitle > Recruitment open!</ AlertTitle >
20
21
< AlertDescription >
21
- Apply to become a part of Armada 2024
22
+ Apply to become a part of Armada { DateTime . now ( ) . year }
22
23
</ AlertDescription >
23
24
</ Alert >
24
25
</ Link >
Original file line number Diff line number Diff line change 1
1
import { NavigationMenu } from "@/components/shared/NavigationMenu"
2
2
import { fetchRecruitment } from "@/components/shared/hooks/api/useRecruitment"
3
3
import { Button } from "@/components/ui/button"
4
+ import { DateTime } from "luxon"
4
5
import Link from "next/link"
5
6
6
7
export default async function ExhibitorLayout ( {
@@ -22,7 +23,8 @@ export default async function ExhibitorLayout({
22
23
< >
23
24
< NavigationMenu
24
25
aside = {
25
- < Link href = "https://ais.armada.nu/fairs/2024/recruitment" >
26
+ < Link
27
+ href = { `https://ais.armada.nu/fairs/${ DateTime . now ( ) . year } /recruitment` } >
26
28
< Button variant = { "outline" } > Apply for Armada</ Button >
27
29
</ Link >
28
30
}
Original file line number Diff line number Diff line change 7
7
import { LocationId , locations } from "@/app/student/map/lib/locations"
8
8
import { feature } from "@/components/shared/feature"
9
9
import { fetchExhibitors } from "@/components/shared/hooks/api/useExhibitors"
10
+ import { DateTime } from "luxon"
10
11
import { Metadata } from "next"
11
12
import { notFound } from "next/navigation"
12
13
import { Suspense } from "react"
@@ -22,7 +23,7 @@ export default async function Page() {
22
23
}
23
24
24
25
const exhibitors = await fetchExhibitors ( {
25
- year : 2024 ,
26
+ year : DateTime . now ( ) . year ,
26
27
next : { revalidate : 3600 / 3 /* 20 min */ }
27
28
} )
28
29
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const metadata: Metadata = {
23
23
export default async function RecruitmentPage ( ) {
24
24
const data = await fetchRecruitment ( {
25
25
next : {
26
- revalidate : 3600 * 3 // 3 hours
26
+ revalidate : 3600 * 24 // once a day
27
27
}
28
28
} )
29
29
You can’t perform that action at this time.
0 commit comments