Skip to content

Commit 8c7bf7b

Browse files
committed
Fix type errors
1 parent 7ae48de commit 8c7bf7b

File tree

5 files changed

+16
-35
lines changed

5 files changed

+16
-35
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@ src/__generated__/
6161
.next/
6262
public/sitemap.xml
6363
out/
64+
65+
tsconfig.tsbuildinfo

src/app/conf/2023/speakers/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function Page() {
1010
return (
1111
<>
1212
<div className="flex w-full justify-center">
13-
<div className="xs:px-0 prose px-2 py-20 md:container lg:prose-lg">
13+
<div className="prose px-2 py-20 md:container lg:prose-lg">
1414
<h1 className="text-white">GraphQLConf 2023 Speakers</h1>
1515
<p className="text-white sm:w-2/3">
1616
Meet the unique lineup of insightful speakers we've carefully
@@ -22,7 +22,7 @@ export default function Page() {
2222
<div className="bg-white">
2323
<section className="conf-block container flex flex-wrap justify-center gap-8 lg:justify-between">
2424
{speakers.map(speaker => (
25-
<Speaker key={speaker.username} {...speaker} year="2023" />
25+
<Speaker key={speaker.username} {...speaker} year={2023} />
2626
))}
2727
</section>
2828
</div>

src/app/conf/2023/types.d.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1 @@
1-
export type ScheduleSession = {
2-
id: string
3-
audience: string
4-
description: string
5-
event_end: string
6-
event_start: string
7-
event_subtype: string
8-
event_type: string
9-
name: string
10-
venue: string
11-
speakers?: SchedSpeaker[]
12-
files?: { name: string; path: string }[]
13-
}
14-
15-
export type SchedSpeaker = {
16-
username: string
17-
name: string
18-
about: string
19-
company?: string
20-
position?: string
21-
avatar?: string
22-
url?: string
23-
role: string
24-
location?: string
25-
socialurls: { service: string; url: string }[]
26-
year: "2024" | "2023"
27-
}
1+
export * from "../_api/sched-types"

src/app/conf/2024/speakers/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function Page() {
1010
return (
1111
<div className='bg-[url("/img/conf/golden-gate-bridge.png")] bg-contain bg-no-repeat'>
1212
<div className="flex w-full justify-center">
13-
<div className="xs:px-0 prose px-2 py-20 md:container lg:prose-lg">
13+
<div className="prose px-2 py-20 md:container lg:prose-lg xs:px-0">
1414
<h1 className="text-white">GraphQLConf 2024 Speakers</h1>
1515
<p className="text-white sm:w-2/3">
1616
Meet the unique lineup of insightful speakers we've carefully
@@ -22,7 +22,7 @@ export default function Page() {
2222
<div className="bg-white">
2323
<section className="conf-block container flex flex-wrap justify-center gap-8 lg:justify-between">
2424
{speakers.map(speaker => (
25-
<Speaker key={speaker.username} {...speaker} year="2024" />
25+
<Speaker key={speaker.username} {...speaker} year={2024} />
2626
))}
2727
</section>
2828
</div>

src/app/conf/_components/speakers/speaker.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
import { Avatar } from "./avatar"
2-
import { SocialMediaIcon, SocialMediaIconServiceType } from "./social-media"
3-
import { SchedSpeaker } from "@/app/conf/2023/types"
41
import NextLink from "next/link"
2+
import { ConferenceYear, SchedSpeaker } from "@/app/conf/_api/sched-types"
3+
4+
import { SocialMediaIcon, SocialMediaIconServiceType } from "./social-media"
5+
import { Avatar } from "./avatar"
6+
7+
export interface SpeakerProps extends SchedSpeaker {
8+
year: ConferenceYear
9+
}
510

611
export function Speaker({
712
name,
@@ -11,7 +16,7 @@ export function Speaker({
1116
username,
1217
socialurls,
1318
year,
14-
}: SchedSpeaker) {
19+
}: SpeakerProps) {
1520
return (
1621
<div className="flex flex-col items-center">
1722
<NextLink href={`/conf/${year}/speakers/${username}`} className="group">

0 commit comments

Comments
 (0)