Skip to content

Commit

Permalink
fix: Year
Browse files Browse the repository at this point in the history
  • Loading branch information
hampfh committed Dec 10, 2024
1 parent 78b38af commit 1d8e90b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/_components/Recruitment.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fetchRecruitment } from "@/components/shared/hooks/api/useRecruitment"
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
import { UserRoundIcon } from "lucide-react"
import { DateTime } from "luxon"
import Link from "next/link"

export async function RecruitmentBanner() {
Expand All @@ -18,7 +19,7 @@ export async function RecruitmentBanner() {
<UserRoundIcon className="h-4 w-4" />
<AlertTitle>Recruitment open!</AlertTitle>
<AlertDescription>
Apply to become a part of Armada 2024
Apply to become a part of Armada {DateTime.now().year}
</AlertDescription>
</Alert>
</Link>
Expand Down
4 changes: 3 additions & 1 deletion src/app/student/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NavigationMenu } from "@/components/shared/NavigationMenu"
import { fetchRecruitment } from "@/components/shared/hooks/api/useRecruitment"
import { Button } from "@/components/ui/button"
import { DateTime } from "luxon"
import Link from "next/link"

export default async function ExhibitorLayout({
Expand All @@ -22,7 +23,8 @@ export default async function ExhibitorLayout({
<>
<NavigationMenu
aside={
<Link href="https://ais.armada.nu/fairs/2024/recruitment">
<Link
href={`https://ais.armada.nu/fairs/${DateTime.now().year}/recruitment`}>
<Button variant={"outline"}>Apply for Armada</Button>
</Link>
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/student/map/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { LocationId, locations } from "@/app/student/map/lib/locations"
import { feature } from "@/components/shared/feature"
import { fetchExhibitors } from "@/components/shared/hooks/api/useExhibitors"
import { DateTime } from "luxon"
import { Metadata } from "next"
import { notFound } from "next/navigation"
import { Suspense } from "react"
Expand All @@ -22,7 +23,7 @@ export default async function Page() {
}

const exhibitors = await fetchExhibitors({
year: 2024,
year: DateTime.now().year,
next: { revalidate: 3600 / 3 /* 20 min */ }
})

Expand Down
2 changes: 1 addition & 1 deletion src/app/student/recruitment/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const metadata: Metadata = {
export default async function RecruitmentPage() {
const data = await fetchRecruitment({
next: {
revalidate: 3600 * 3 // 3 hours
revalidate: 3600 * 24 // once a day
}
})

Expand Down

0 comments on commit 1d8e90b

Please sign in to comment.