Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustPaulsrud committed Mar 9, 2024
1 parent 8f5cd0f commit 7014d30
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 44 deletions.
83 changes: 42 additions & 41 deletions src/app/exhibitor/_components/CurrentStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Link from "next/link"
//ASSUMPTION: the start date will be first for fair dates
export async function CurrentStatus() {
const dates = await fetchDates()
const today = Date.now() //.toISOString();
const today = Date.now() //.toISOString();
console.log(today)

function formatDate(date: string) {
Expand All @@ -16,48 +16,49 @@ export async function CurrentStatus() {
)
}


if(today < (new Date(dates.ir.start)).getTime()){
return (
<div>
<Alert className="mt-0">
<Sparkles size={20} />
<AlertTitle>Registration is opening soon!</AlertTitle>
<AlertDescription>
We are preparing the registration for next year's Armada. In the meanwhile, you are very welcome to report interest in this{" "}
<Link
className="text-white underline hover:no-underline"
href="https://docs.google.com/forms/d/e/1FAIpQLSdny1mhsj1Wutt_FaJtqgxKJP3OOBrWW09Ic3T5_NwEHWhV_w/viewform?usp=sf_link">
form
</Link>{" "}
and we will get back to you once registration is open!
</AlertDescription>
</Alert>
</div>
)
}
else if(((new Date(dates.ir.start)).getTime() < today) && (today < (new Date(dates.ir.end)).getTime())){
return(
if (today < new Date(dates.ir.start).getTime()) {
return (
<div>
<Alert className="mt-0">
<Sparkles size={20} />
<AlertTitle>Registration is opening soon!</AlertTitle>
<AlertDescription>
We are preparing the registration for next year&apos;s Armada. In
the meanwhile, you are very welcome to report interest in this{" "}
<Link
className="text-white underline hover:no-underline"
href="https://docs.google.com/forms/d/e/1FAIpQLSdny1mhsj1Wutt_FaJtqgxKJP3OOBrWW09Ic3T5_NwEHWhV_w/viewform?usp=sf_link">
form
</Link>{" "}
and we will get back to you once registration is open!
</AlertDescription>
</Alert>
</div>
)
} else if (
new Date(dates.ir.start).getTime() < today &&
today < new Date(dates.ir.end).getTime()
) {
return (
<div>
<Alert className="mt-5">
<Sparkles size={20} />
<AlertTitle>Initial Registration open</AlertTitle>
<AlertDescription>
In initial registration you apply to be an exhibitor at Armada. When you do so you commit to exhibit, but you don't have to specify your package yet. Read more about each stage{" "}
<Link
className="text-white underline hover:no-underline"
href="/exhibitor/timeline">
here
</Link>{" "}
</AlertDescription>
</Alert>
</div>
<Alert className="mt-5">
<Sparkles size={20} />
<AlertTitle>Initial Registration open</AlertTitle>
<AlertDescription>
In initial registration you apply to be an exhibitor at Armada. When
you do so you commit to exhibit, but you don&apos;t have to specify
your package yet. Read more about each stage{" "}
<Link
className="text-white underline hover:no-underline"
href="/exhibitor/timeline">
here
</Link>{" "}
</AlertDescription>
</Alert>
</div>
)
}

//default
return(
<div></div>
)

return <div></div>
}
6 changes: 3 additions & 3 deletions src/app/exhibitor/_components/ExhibitorTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export async function ExhibitorTimeline() {
their dream employer!
</P>
<P className="mt-2 text-stone-400">
In Initial Registration you don't need to choose a package, and
the packages are outlined{" "}
In Initial Registration you don&apost need to choose a package,
and the packages are outlined{" "}
<a
className="text-white underline hover:no-underline"
href="/exhibitor/packages">
Expand Down Expand Up @@ -213,7 +213,7 @@ export async function ExhibitorTimeline() {
href="mailto:[email protected]">
[email protected]
</a>{" "}
or your sales representative and they'll guide you through it.
or your sales representative and they&aposll guide you through it.
Maybe you want to talk to a few students in a more cozy setting?
Or stand out extra on the fair compared to everyone else? We can
help you do that.
Expand Down
5 changes: 5 additions & 0 deletions src/components/shared/hooks/api/useDates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ interface FairDate {
ir: {
start: string
end: string
acceptance: string
}
fr: {
start: string
end: string
}
events: {
start: string
end: string
}
}

export async function fetchDates() {
Expand Down

0 comments on commit 7014d30

Please sign in to comment.