Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for companies #4

Merged
merged 11 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-navigation-menu": "^1.1.4",
Expand All @@ -21,6 +22,7 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"contentful": "^10.6.21",
"embla-carousel-react": "^8.0.0",
"lucide-react": "^0.323.0",
"luxon": "^3.4.4",
"next": "14.1.0",
Expand Down
28 changes: 28 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions public/armada_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/fair_pictures/49121988801_f0b111943f_k.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/app/_components/Paragraph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { cn } from "@/lib/utils"

export function P(props: React.HTMLAttributes<HTMLParagraphElement>) {
const { className, children, ...rest } = props
return (
<p className={cn("mt-2 text-stone-400", className)} {...rest}>
{children}
</p>
)
}
64 changes: 64 additions & 0 deletions src/app/exhibitor/_components/CurrentStatus.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { fetchDates } from "@/components/shared/hooks/api/useDates"
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
import { Sparkles } from "lucide-react"
import { DateTime } from "luxon"
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();
console.log(today)

function formatDate(date: string) {
return DateTime.fromISO(date).toFormat(
`d MMMM ${DateTime.fromISO(date).year !== DateTime.now().year ? " YYYY" : ""}`
)
}

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&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>
}
Loading
Loading