Skip to content

Commit 5b97b6a

Browse files
committed
Make the padding and borders better
1 parent d37aa58 commit 5b97b6a

File tree

4 files changed

+27
-17
lines changed

4 files changed

+27
-17
lines changed

src/app/conf/2025/components/get-your-ticket/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function GetYourTicket({ className }: { className?: string }) {
1515
)}
1616
>
1717
<Stripes />
18-
<div className="gql-conf-container relative lg:px-12 xl:gap-x-24 xl:px-24">
18+
<div className="gql-conf-container gql-conf-section relative">
1919
<header className="flex flex-wrap justify-between gap-6 md:items-end">
2020
<h2 className="whitespace-pre text-white typography-h2">
2121
Get your ticket

src/app/conf/2025/components/get-your-ticket/ticket-period.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { GET_TICKETS_LINK } from "../../links"
55
export interface TicketPeriodProps {
66
price: string
77
date: Date | [Date, Date]
8+
isLoading?: boolean
89
soldOut?: boolean
910
comingSoon?: boolean
1011
name: string
@@ -13,11 +14,12 @@ export interface TicketPeriodProps {
1314
export function TicketPeriod({
1415
price,
1516
date,
17+
isLoading,
1618
soldOut,
1719
comingSoon,
1820
name,
1921
}: TicketPeriodProps) {
20-
const disabled = soldOut || comingSoon
22+
const disabled = soldOut || comingSoon || isLoading
2123

2224
return (
2325
<article
@@ -59,7 +61,13 @@ export function TicketPeriod({
5961
className="light w-full"
6062
href={GET_TICKETS_LINK}
6163
>
62-
{soldOut ? "Sold out" : comingSoon ? "Coming soon" : "Get a ticket"}
64+
{isLoading
65+
? "Get a ticket"
66+
: soldOut
67+
? "Sold out"
68+
: comingSoon
69+
? "Coming soon"
70+
: "Get a ticket"}
6371
</Button>
6472
</div>
6573
</article>

src/app/conf/2025/components/get-your-ticket/ticket-periods.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import { useState, useEffect } from "react"
55
import { TicketPeriod } from "./ticket-period"
66

77
// Ticket period end dates (using zero-indexed months)
8-
const EARLY_BIRD_END_DATE = new Date(2025, 6, 13, 23, 59) // July 13th
9-
const STANDARD_END_DATE = new Date(2025, 7, 31, 23, 59) // August 31st
10-
const LATE_END_DATE = new Date(2025, 8, 10, 23, 59) // September 10th
8+
// Dates are specified in CET (UTC+1/UTC+2 for CEST) and converted to UTC
9+
// Example: July 13th 23:59 CEST (UTC+2) becomes July 13th 21:59 UTC
10+
const EARLY_BIRD_END_DATE = new Date(Date.UTC(2025, 6, 13, 21, 59)) // July 13th 23:59 CEST
11+
const STANDARD_END_DATE = new Date(Date.UTC(2025, 7, 31, 21, 59)) // August 31st 23:59 CEST
12+
const LATE_END_DATE = new Date(Date.UTC(2025, 8, 10, 21, 59)) // September 10th 23:59 CEST
1113

1214
export function TicketPeriods() {
1315
const now = useCurrentDate()
@@ -19,34 +21,34 @@ export function TicketPeriods() {
1921
price="$599"
2022
date={EARLY_BIRD_END_DATE}
2123
comingSoon={false}
22-
soldOut={now > EARLY_BIRD_END_DATE}
24+
isLoading={!now}
25+
soldOut={!!now && now > EARLY_BIRD_END_DATE}
2326
/>
2427
<TicketPeriod
2528
name="Standard"
2629
price="$799"
2730
date={[new Date(2025, 6, 14), STANDARD_END_DATE]}
28-
comingSoon={now < EARLY_BIRD_END_DATE}
29-
soldOut={now > STANDARD_END_DATE}
31+
isLoading={!now}
32+
comingSoon={!!now && now < EARLY_BIRD_END_DATE}
33+
soldOut={!!now && now > STANDARD_END_DATE}
3034
/>
3135
<TicketPeriod
3236
name="Late"
3337
price="$899"
3438
date={[new Date(2025, 8, 1), LATE_END_DATE]}
35-
comingSoon={now < STANDARD_END_DATE}
36-
soldOut={now > LATE_END_DATE}
39+
isLoading={!now}
40+
comingSoon={!!now && now < STANDARD_END_DATE}
41+
soldOut={!!now && now > LATE_END_DATE}
3742
/>
3843
</>
3944
)
4045
}
4146

42-
const DEFAULT_DATE = new Date(2025, 8, 12)
43-
4447
function useCurrentDate() {
45-
const [date, setDate] = useState<Date>(DEFAULT_DATE)
48+
const [date, setDate] = useState<Date | null>(null)
4649

4750
useEffect(() => {
48-
const end = new Date(2025, 6, 14)
49-
setDate(end)
51+
setDate(new Date())
5052
}, [])
5153

5254
return date

src/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,5 +513,5 @@ div[id^="headlessui-menu-items"] {
513513
}
514514

515515
.gql-conf-section {
516-
@apply 3xl:px-[240px] px-4 py-8 lg:px-12 xl:gap-x-24 xl:px-24;
516+
@apply px-4 py-8 lg:px-12 xl:gap-x-24 xl:px-24 3xl:px-[240px];
517517
}

0 commit comments

Comments
 (0)