From bd023c847832969b48edc3a1d7377be6d3791432 Mon Sep 17 00:00:00 2001 From: YassinEldeeb Date: Tue, 6 Aug 2024 13:31:46 +0100 Subject: [PATCH 1/2] put speakers and schedule at the top --- src/app/conf/2024/page.tsx | 94 +++++++++++++++++++++++++++++++++++ src/app/conf/2024/pricing.tsx | 87 -------------------------------- 2 files changed, 94 insertions(+), 87 deletions(-) diff --git a/src/app/conf/2024/page.tsx b/src/app/conf/2024/page.tsx index 789ebf49c0..878a946777 100644 --- a/src/app/conf/2024/page.tsx +++ b/src/app/conf/2024/page.tsx @@ -5,6 +5,37 @@ import { About } from "./about" import { Pricing } from "./pricing" import { Venue } from "./venue" import { Button } from "@/app/conf/_components/button" +import clsx from 'clsx' +import { InfiniteMovingSpeakers } from '../_components/infinite-moving-speakers' +import { schedule, speakers } from './_data' +import { SessionList } from '../_components/schedule/session-list' +import { filterCategories2024 } from '../_components/schedule/filter-categories' +import { eventsColors } from './utils' + +function shuffle(array: T): T { + let currentIndex = array.length + let randomIndex: number + + // While there remain elements to shuffle. + while (currentIndex > 0) { + // Pick a remaining element. + randomIndex = Math.floor(Math.random() * currentIndex) + currentIndex-- + + // And swap it with the current element. + ;[array[currentIndex], array[randomIndex]] = [ + array[randomIndex], + array[currentIndex], + ] + } + + return array +} + +const classes = { + heading: "text-[45px] text-center font-bold mb-20", + container: "conf-block container text-white", +} export const metadata: Metadata = { title: "GraphQLConf 2024 — Sept 10-12", @@ -62,6 +93,69 @@ export default function Page() { + +
+

+ Our Special Speakers +

+ + + {speakers + .filter(e => e.avatar) + .map(speaker => ( +
+ + {speaker.name} + +
+ + {speaker.name.split(" ")[0]} + +
+
+ ))} +
+ +
+ +
+ +
+

+ The Schedule +

+ + e.speakers)) + .slice(0, 3) + .map(schedule => ({ + ...schedule, + speakers: + schedule?.speakers?.map(speaker => + speakers.find(s => s.username === speaker.username), + ) || [], + }))} + /> +
+ +
+ +
+
+ diff --git a/src/app/conf/2024/pricing.tsx b/src/app/conf/2024/pricing.tsx index 493174c82c..67d293bfab 100644 --- a/src/app/conf/2024/pricing.tsx +++ b/src/app/conf/2024/pricing.tsx @@ -1,11 +1,6 @@ import { Button } from "@/app/conf/_components/button" import { CheckIcon } from "@/icons" import { clsx } from "clsx" -import { schedule, speakers } from "./_data" -import { InfiniteMovingSpeakers } from "../_components/infinite-moving-speakers" -import { SessionList } from "../_components/schedule/session-list" -import { filterCategories2024 } from "../_components/schedule/filter-categories" -import { eventsColors } from "./utils" interface Pricing { title: string @@ -14,26 +9,6 @@ interface Pricing { expiredDate: Date } -function shuffle(array: T): T { - let currentIndex = array.length - let randomIndex: number - - // While there remain elements to shuffle. - while (currentIndex > 0) { - // Pick a remaining element. - randomIndex = Math.floor(Math.random() * currentIndex) - currentIndex-- - - // And swap it with the current element. - ;[array[currentIndex], array[randomIndex]] = [ - array[randomIndex], - array[currentIndex], - ] - } - - return array -} - const pricing: Pricing[] = [ { title: "Early Bird", @@ -114,68 +89,6 @@ export function Pricing() { ))} - -
-

- Our Special Speakers -

- - - {speakers - .filter(e => e.avatar) - .map(speaker => ( -
- - {speaker.name} - -
- - {speaker.name.split(" ")[0]} - -
-
- ))} -
- -
- -
- -
-

- The Schedule -

- - e.speakers)) - .slice(0, 3) - .map(schedule => ({ - ...schedule, - speakers: - schedule?.speakers?.map(speaker => - speakers.find(s => s.username === speaker.username), - ) || [], - }))} - /> -
- -
- -
-
) } From ccce0cff8dd40ca9e08c548f5f72deae71fe4f15 Mon Sep 17 00:00:00 2001 From: YassinEldeeb Date: Tue, 6 Aug 2024 13:33:19 +0100 Subject: [PATCH 2/2] chore: prettier --- src/app/conf/2024/page.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/conf/2024/page.tsx b/src/app/conf/2024/page.tsx index 878a946777..a1d623e361 100644 --- a/src/app/conf/2024/page.tsx +++ b/src/app/conf/2024/page.tsx @@ -5,12 +5,12 @@ import { About } from "./about" import { Pricing } from "./pricing" import { Venue } from "./venue" import { Button } from "@/app/conf/_components/button" -import clsx from 'clsx' -import { InfiniteMovingSpeakers } from '../_components/infinite-moving-speakers' -import { schedule, speakers } from './_data' -import { SessionList } from '../_components/schedule/session-list' -import { filterCategories2024 } from '../_components/schedule/filter-categories' -import { eventsColors } from './utils' +import clsx from "clsx" +import { InfiniteMovingSpeakers } from "../_components/infinite-moving-speakers" +import { schedule, speakers } from "./_data" +import { SessionList } from "../_components/schedule/session-list" +import { filterCategories2024 } from "../_components/schedule/filter-categories" +import { eventsColors } from "./utils" function shuffle(array: T): T { let currentIndex = array.length