Skip to content

fix: broken schedule and session page styles #1763

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

Merged
merged 4 commits into from
Aug 15, 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
5 changes: 3 additions & 2 deletions src/app/conf/2024/schedule/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default function SessionPage({ params }: SessionProps) {
if (!event) {
notFound()
}

// @ts-expect-error -- fixme
event.speakers = (event.speakers || []).map(speaker =>
speakers.find(s => s.username === speaker.username),
Expand Down Expand Up @@ -118,10 +119,10 @@ export default function SessionPage({ params }: SessionProps) {
- {format(parseISO(event.event_end), "hh:mmaaaa 'PDT'")}
</span>
</div>
<div className="flex lg:flex-row flex-col sm:gap-5">
<div className="flex flex-wrap lg:flex-row flex-col gap-5 mt-8">
{event.speakers!.map(speaker => (
<div
className="flex items-center gap-3"
className={`flex items-center gap-3 w-full ${event?.speakers?.length || 0 > 1 ? "max-w-[320px]" : ""}`}
key={speaker.username}
>
<Avatar
Expand Down
4 changes: 3 additions & 1 deletion src/app/conf/_components/schedule/schedule-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ function getSessionsByDay(
}
sessionsByDay[day] = {
...sessionsByDay[day],
[date]: sessions.sort((a, b) => a.venue.localeCompare(b.venue)),
[date]: sessions.sort((a, b) =>
(a?.venue ?? "").localeCompare(b?.venue ?? ""),
),
}
})

Expand Down
6 changes: 4 additions & 2 deletions src/app/conf/_components/schedule/session-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ScheduleSession {
event_subtype: string
event_type: string
name: string
venue: string
venue?: string
speakers?: SchedSpeaker[] | string
files?: { name: string; path: string }[]
}
Expand Down Expand Up @@ -78,7 +78,9 @@ function getSessionsByDay(
}
sessionsByDay[day] = {
...sessionsByDay[day],
[date]: sessions.sort((a, b) => a.venue.localeCompare(b.venue)),
[date]: sessions.sort((a, b) =>
(a?.venue ?? "").localeCompare(b?.venue ?? ""),
),
}
})

Expand Down
3 changes: 3 additions & 0 deletions src/app/conf/_components/speakers/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const Avatar: FC<Props> = ({ avatar, name, className, href }) => {
className={`${className}`}
src={avatar}
alt={`${name} Profile Image`}
style={{
margin: 0,
}}
/>
) : (
<div
Expand Down