Skip to content

Commit 74667f2

Browse files
authored
Website/conf/speak: Update text & dynamic display (graphql#1466)
1 parent 4e8eba9 commit 74667f2

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

src/components/Conf/Speakers/index.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ const speakers: Speaker[] = [
4646
]
4747

4848
const SpeakersConf = () => {
49+
const today = new Date()
50+
const expiredDate = new Date("2023-06-10")
51+
const isExpired = expiredDate > today
52+
4953
return (
5054
// Invisible padding so anchor links align to the header menu
5155
<div id="speakers" className="-mt-16 pt-16">
@@ -91,11 +95,13 @@ const SpeakersConf = () => {
9195
challenges facing the growing GraphQL ecosystem. If you have
9296
something worth sharing, submit an application to speak!
9397
</p>
94-
<div className="my-8">
95-
<ButtonConf className="mx-auto" href="/conf/speak/">
96-
Submit to Speak
97-
</ButtonConf>
98-
</div>
98+
{isExpired && (
99+
<div className="my-8">
100+
<ButtonConf className="mx-auto" href="/conf/speak/">
101+
Submit to Speak
102+
</ButtonConf>
103+
</div>
104+
)}
99105
</div>
100106
</div>
101107
</div>

src/pages/conf/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import SeoConf, { defaults as seoDefaults } from "../../components/Conf/Seo"
1313
import { CalendarIcon, GlobeIcon } from "@radix-ui/react-icons"
1414

1515
export default () => {
16+
const today = new Date()
17+
const expiredDate = new Date("2023-06-10")
18+
const isExpired = expiredDate > today
19+
1620
return (
1721
<LayoutConf>
1822
<HeaderConf />
@@ -39,7 +43,9 @@ export default () => {
3943
<div className="flex justify-left gap-4 flex-row flex-wrap">
4044
<ButtonConf href="/conf/sponsor/">Join as a Sponsor</ButtonConf>
4145
<ButtonConf href="/conf/partner/">Join as a Partner</ButtonConf>
42-
<ButtonConf href="/conf/speak/">Submit to Speak</ButtonConf>
46+
{isExpired && (
47+
<ButtonConf href="/conf/speak/">Submit to Speak</ButtonConf>
48+
)}
4349
</div>
4450
</div>
4551
</div>

src/pages/conf/speak.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const cfp: Array<{ id: string; title: string; contents: ReactNode }> = [
1515
items={[
1616
["CFP Closes", "Friday, June 9 at 11:59 PM PDT (UTC-7)"],
1717
["CFP Notifications", "Wednesday, June 21"],
18-
["Schedule Announcement", "Friday, June 29"],
18+
["Schedule Announcement", "Week of June 26"],
1919
["Slide upload deadline to Sched.com", "Friday, September 15"],
2020
["Event Date", "Tuesday, September 19 – Thursday, September 21"],
2121
]}
@@ -276,6 +276,10 @@ function DL({ items }: { items: [header: string, contents: ReactNode][] }) {
276276
}
277277

278278
export default () => {
279+
const today = new Date()
280+
const expiredDate = new Date("2023-06-10")
281+
const isExpired = expiredDate > today
282+
279283
return (
280284
<LayoutConf>
281285
<HeaderConf />
@@ -297,9 +301,13 @@ export default () => {
297301
</a>
298302
.
299303
</p>
300-
<ButtonConf href="https://sessionize.com/graphqlconf2023/">
301-
Submit a Proposal
302-
</ButtonConf>
304+
{isExpired ? (
305+
<ButtonConf href="https://sessionize.com/graphqlconf2023/">
306+
Submit a Proposal
307+
</ButtonConf>
308+
) : (
309+
<div className="font-bold"> The CFP has closed.</div>
310+
)}
303311
<p className="italic">
304312
Please be aware that the Linux Foundation will now be utilizing
305313
Sessionize for CFP submissions. Sessionize is a cloud-based event

0 commit comments

Comments
 (0)