Skip to content

Commit

Permalink
fix: Convert to next links and remove redundant query
Browse files Browse the repository at this point in the history
  • Loading branch information
hampfh committed Mar 10, 2024
1 parent ad34ab4 commit 48addde
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
17 changes: 5 additions & 12 deletions src/app/exhibitor/packages/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Page } from "@/components/shared/Page"
import { fetchDates } from "@/components/shared/hooks/api/useDates"
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import {
Expand All @@ -8,8 +7,8 @@ import {
CollapsibleTrigger
} from "@/components/ui/collapsible"
import { ChevronsUpDown, Sparkles } from "lucide-react"
import { DateTime } from "luxon"
import { Metadata } from "next"
import Link from "next/link"

export const metadata: Metadata = {
title: `Packages - Armada Exhibitor`,
Expand All @@ -18,12 +17,6 @@ export const metadata: Metadata = {
}

export default async function Packages() {
function formatDate(date: string) {
return DateTime.fromISO(date).toFormat(
`d MMMM ${DateTime.fromISO(date).year !== DateTime.now().year ? " YYYY" : ""}`
)
}
const dates = await fetchDates()
return (
<Page.Background withIndents>
<Page.Boundary className="pb-20">
Expand Down Expand Up @@ -149,17 +142,17 @@ export default async function Packages() {
<CollapsibleContent className="p-2 text-stone-400">
<p>You can sign up here:</p>
<div className="my-4">
<a href="https://register.armada.nu/register">
<Link href="https://register.armada.nu/register">
<Button>Signup to Armada</Button>
</a>
</Link>
</div>
<p>
If you have any questions, you can contact us at{" "}
<a
<Link
className="text-white underline hover:no-underline"
href="mailto:[email protected]">
[email protected]
</a>
</Link>
.
</p>
</CollapsibleContent>
Expand Down
9 changes: 5 additions & 4 deletions src/app/exhibitor/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PhotoCarousel } from "@/app/exhibitor/_components/PhotoCarousel"
import { Page } from "@/components/shared/Page"
import { Button } from "@/components/ui/button"
import { Metadata } from "next"
import Link from "next/link"

export const metadata: Metadata = {
title: `Become an exhibitor at Armada`
Expand Down Expand Up @@ -42,16 +43,16 @@ export default function ForExhibitorsPage() {
<a href="https://register.armada.nu/register">
<Button>Signup to Armada</Button>
</a>
<a href="/exhibitor/packages">
<Link href="/exhibitor/packages">
<Button variant={"secondary"} className="dark:bg-liqorice-700">
Packages
</Button>
</a>
<a href="/exhibitor/timeline">
</Link>
<Link href="/exhibitor/timeline">
<Button variant={"secondary"} className="dark:bg-liqorice-700">
Timeline
</Button>
</a>
</Link>
</div>
<p className="text-xs text-slate-400">
Or{" "}
Expand Down
4 changes: 2 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export default async function HomePage() {
<a href="https://register.armada.nu/register">
<Button>Exhibitor signup</Button>
</a>
<a href="/exhibitor/packages">
<Link href="/exhibitor/packages">
<Button
variant={"secondary"}
className="dark:bg-liqorice-700">
This Years Packages
<ArrowRightIcon className="ml-2 h-4 w-4" />
</Button>
</a>
</Link>
</div>
<Suspense>
<FairDates />
Expand Down

0 comments on commit 48addde

Please sign in to comment.