Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
YassinEldeeb committed Jul 4, 2024
1 parent f8c0a88 commit 4c3bc9a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/app/conf/2023/sessions/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Metadata } from "next"
import { SessionList } from "@/app/conf/_components/schedule/session-list"
import { schedule, speakers } from "@/app/conf/2023/_data"
import { eventsColors } from '../utils'
import { filterCategories2023 } from '../../_components/schedule/filter-categories'
import { eventsColors } from "../utils"
import { filterCategories2023 } from "../../_components/schedule/filter-categories"

export const metadata: Metadata = {
title: "Sessions",
Expand All @@ -13,7 +13,7 @@ export default function SessionsPage() {
<div className="bg-[#f4f6f8]">
<div className="container conf-block">
<SessionList
year='2023'
year="2023"
eventsColors={eventsColors}
filterCategories={filterCategories2023}
// @ts-expect-error -- fixme
Expand Down
6 changes: 3 additions & 3 deletions src/app/conf/2023/speakers/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { speakers, schedule } from "@/app/conf/2023/_data"
import { ChevronLeftIcon } from "@/icons"
import NextLink from "next/link"
import { eventsColors } from "../../utils"
import { filterCategories2023 } from '@/app/conf/_components/schedule/filter-categories'
import { filterCategories2023 } from "@/app/conf/_components/schedule/filter-categories"

type SpeakerProps = { params: { id: string } }

Expand Down Expand Up @@ -47,8 +47,8 @@ export default function SpeakerPage({ params }: SpeakerProps) {
.filter(s => s.speakers && s.speakers.some(s => s.username === params.id))
.map(s => ({
...s,
speakers: s.speakers!.map(s =>
speakers.find(speaker => speaker.username === s.username)!,
speakers: s.speakers!.map(
s => speakers.find(speaker => speaker.username === s.username)!,
),
}))

Expand Down
5 changes: 1 addition & 4 deletions src/app/conf/2024/schedule/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import { speakers, schedule } from "@/app/conf/2024/_data"
import { metadata as layoutMetadata } from "@/app/conf/2023/layout"
import { ScheduleSession } from "../../../2023/types"

function getEventTitle(
event: ScheduleSession,
speakers: string[],
): string {
function getEventTitle(event: ScheduleSession, speakers: string[]): string {
let { name } = event

if (!speakers) {
Expand Down
12 changes: 6 additions & 6 deletions src/app/conf/2024/speakers/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import { speakers, schedule } from "@/app/conf/2024/_data"
import { ChevronLeftIcon } from "@/icons"
import NextLink from "next/link"
import { eventsColors } from "../../utils"
import { filterCategories2024 } from '@/app/conf/_components/schedule/filter-categories'
import { filterCategories2024 } from "@/app/conf/_components/schedule/filter-categories"

type SpeakerProps = { params: { id: string } }

export function generateMetadata({ params }: SpeakerProps): Metadata {
const decodedId = decodeURIComponent(params.id);
const decodedId = decodeURIComponent(params.id)
const speaker = speakers.find(s => s.username === decodedId)!

const keywords = [speaker.name, speaker.company, speaker.position].filter(
Expand All @@ -35,19 +35,19 @@ export function generateMetadata({ params }: SpeakerProps): Metadata {
}

export function generateStaticParams() {
return speakers.map(s => ({ id: s.username }));
return speakers.map(s => ({ id: s.username }))
}

export default function SpeakerPage({ params }: SpeakerProps) {
const decodedId = decodeURIComponent(params.id);
const decodedId = decodeURIComponent(params.id)
const speaker = speakers.find(s => s.username === decodedId)!

const s = schedule
.filter(s => s.speakers && s.speakers.some(s => s.username === decodedId))
.map(s => ({
...s,
speakers: s.speakers!.map(s =>
speakers.find(speaker => speaker.username === s.username)!,
speakers: s.speakers!.map(
s => speakers.find(speaker => speaker.username === s.username)!,
),
}))

Expand Down
6 changes: 3 additions & 3 deletions src/app/conf/_components/thanks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { SessionList } from "./schedule/session-list"
import { Button } from "./button"
import leeImage from "../2023/gallery/images/3.jpg"
import { schedule, speakers } from "@/app/conf/2023/_data"
import { eventsColors } from '../2023/utils'
import { filterCategories2023 } from './schedule/filter-categories'
import { eventsColors } from "../2023/utils"
import { filterCategories2023 } from "./schedule/filter-categories"

function shuffle<T extends any[]>(array: T): T {
let currentIndex = array.length
Expand Down Expand Up @@ -55,7 +55,7 @@ export async function Thanks() {
</div>
</div>
<SessionList
year='2023'
year="2023"
filterCategories={filterCategories2023}
eventsColors={eventsColors}
showFilter={false}
Expand Down

0 comments on commit 4c3bc9a

Please sign in to comment.