Skip to content

Commit b128235

Browse files
committed
refactor(meeting): update imports to absolute paths and add openFeedbackId prop
1 parent 5ea8921 commit b128235

5 files changed

Lines changed: 77 additions & 74 deletions

File tree

src/components/Talk/TalkCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import CommonTalkCard, { TalkCardProps } from "../common/TalkCard";
2+
import { TalkCard as CommonTalkCard, TalkCardProps } from "../common/TalkCard";
33

44
export type { TalkCardProps };
55

src/components/common/TalkCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const TalkCard: FC<React.PropsWithChildren<TalkCardProps>> = ({
112112
return <Tag key={tag} text={tag} textColor={Color.WHITE} />;
113113
})}
114114
</StyledTagsWrapper>
115-
<section style={{ display: "none" }}>
115+
<section style={{ display: "block" }}>
116116
<StyledVoteTalkLink
117117
href={`https://openfeedback.io/${openFeedbackId}/0/${talk.id}`}
118118
target={"_blank"}

src/types/sessions.ts

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,90 @@
1-
import {ISpeaker} from "./speakers";
1+
import { ISpeaker } from "./speakers";
22

33
export interface SessionSpeaker {
4-
readonly id: string;
5-
readonly name: string;
4+
readonly id: string;
5+
readonly name: string;
66
}
77

88
export enum CategoryItemEnum {
9-
Language = "Language",
10-
Track = "Track",
11-
Format = "Session format",
12-
Level = "Level",
9+
Language = "Language",
10+
Track = "Track",
11+
Format = "Session format",
12+
Level = "Level",
1313
}
1414

1515
interface CategoryItem {
16-
readonly id: number;
17-
readonly name: string;
16+
readonly id: number;
17+
readonly name: string;
1818
}
1919

2020
export interface SessionCategory {
21-
readonly id: number;
22-
readonly name: CategoryItemEnum;
23-
readonly categoryItems: CategoryItem[];
21+
readonly id: number;
22+
readonly name: CategoryItemEnum;
23+
readonly categoryItems: CategoryItem[];
2424
}
2525

2626
export interface Session {
27-
readonly id: number;
28-
readonly title: string;
29-
readonly description: string;
30-
readonly startsAt: string;
31-
readonly endsAt: string;
32-
readonly slidesURL?: string;
33-
readonly speakers: SessionSpeaker[];
34-
readonly categories: SessionCategory[];
35-
readonly questionAnswers: QuestionAnswers[];
36-
readonly recordingUrl?: string;
37-
readonly track: string;
27+
readonly id: number;
28+
readonly title: string;
29+
readonly description: string;
30+
readonly startsAt: string;
31+
readonly endsAt: string;
32+
readonly slidesURL?: string;
33+
readonly speakers: SessionSpeaker[];
34+
readonly categories: SessionCategory[];
35+
readonly questionAnswers: QuestionAnswers[];
36+
readonly recordingUrl?: string;
37+
readonly track: string;
3838
}
3939

4040
export interface IGroup {
41-
readonly groupId: number;
42-
readonly groupName: string;
43-
readonly sessions: Session[];
44-
readonly isDefault: boolean;
41+
readonly groupId: number;
42+
readonly groupName: string;
43+
readonly sessions: Session[];
44+
readonly isDefault: boolean;
4545
}
4646

4747
export interface QuestionAnswers {
48-
readonly id: number;
49-
readonly question: string;
50-
readonly questionType: string;
51-
readonly answer: string;
48+
readonly id: number;
49+
readonly question: string;
50+
readonly questionType: string;
51+
readonly answer: string;
5252
}
5353

5454
export interface IMeeting {
55-
id: number;
56-
urlName?: string;
57-
title: string;
58-
description: string;
59-
videoUrl?: string;
60-
slidesURL?: string;
61-
videoTags?: string[];
62-
speakers: SessionSpeaker[];
63-
level?: string;
64-
type?: string;
65-
language?: string;
66-
track?: string;
67-
startDate: string;
68-
endDate: string;
69-
startTime: string;
70-
endTime: string;
55+
id: number;
56+
urlName?: string;
57+
title: string;
58+
description: string;
59+
videoUrl?: string;
60+
slidesURL?: string;
61+
videoTags?: string[];
62+
speakers: SessionSpeaker[];
63+
level?: string;
64+
type?: string;
65+
language?: string;
66+
track?: string;
67+
startDate: string;
68+
endDate: string;
69+
startTime: string;
70+
endTime: string;
7171
}
7272

7373
export interface IMeetingDetailProps {
74-
meeting: IMeeting;
75-
speakers?: ISpeaker[];
74+
meeting: IMeeting;
75+
speakers?: ISpeaker[];
76+
openFeedbackId: string;
7677
}
7778

7879
export type MyType = {
79-
urlName?: string;
80-
videoUrl?: string;
81-
level?: string;
82-
videoTags?: string[];
83-
speakers?: ISpeaker[];
84-
description: string;
85-
language?: string;
86-
title: string;
87-
type?: string;
88-
track?: string;
89-
};
80+
urlName?: string;
81+
videoUrl?: string;
82+
level?: string;
83+
videoTags?: string[];
84+
speakers?: ISpeaker[];
85+
description: string;
86+
language?: string;
87+
title: string;
88+
type?: string;
89+
track?: string;
90+
};

src/views/MeetingDetail/MeetingDetail.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export const StyledVoteTalkLink = styled.a`
105105
const MeetingDetail: FC<React.PropsWithChildren<IMeetingDetailProps>> = ({
106106
meeting,
107107
speakers: mySpeakers,
108+
openFeedbackId,
108109
}) => {
109110
const { width } = useWindowSize();
110111

@@ -199,9 +200,9 @@ const MeetingDetail: FC<React.PropsWithChildren<IMeetingDetailProps>> = ({
199200
<StyledVideoTagsContainer>
200201
{meeting.videoTags?.map((tag) => <Tag text={tag} key={tag} />)}
201202
</StyledVideoTagsContainer>
202-
<section style={{ display: "none" }}>
203+
<section style={{ display: "block" }}>
203204
<StyledVoteTalkLink
204-
href={`https://openfeedback.io/devbcn24/0/${meeting.id}`}
205+
href={`https://openfeedback.io/${openFeedbackId}/0/${meeting.id}`}
205206
target={"_blank"}
206207
rel="noreferrer noopener"
207208
>

src/views/MeetingDetail/TalkDetailContainer.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { Color } from "../../styles/colors";
1+
import { Color } from "@styles/colors";
22
import React, { FC, useEffect } from "react";
3-
import NotFoundError from "../../components/NotFoundError/NotFoundError";
4-
import SectionWrapper from "../../components/SectionWrapper/SectionWrapper";
3+
import NotFoundError from "@components/NotFoundError/NotFoundError";
4+
import SectionWrapper from "@components/SectionWrapper/SectionWrapper";
55
import { styled } from "styled-components";
66
import { useParams } from "react-router";
7-
import conferenceData from "../../data/2025.json";
8-
import { useFetchTalksById } from "../../hooks/useFetchTalks";
9-
import { useFetchSpeakers } from "../../hooks/useFetchSpeakers";
7+
import conferenceData from "@data/2025.json";
8+
import { useFetchTalksById } from "@hooks/useFetchTalks";
9+
import { useFetchSpeakers } from "@hooks/useFetchSpeakers";
1010
import MeetingDetail from "./MeetingDetail";
11-
import { ISpeaker } from "../../types/speakers";
12-
import { sessionAdapter } from "../../services/sessionsAdapter";
13-
import { Session } from "../../types/sessions";
14-
import { useSentryErrorReport } from "../../hooks/useSentryErrorReport";
11+
import { ISpeaker } from "@types/speakers";
12+
import { sessionAdapter } from "@services/sessionsAdapter";
13+
import { Session } from "@types/sessions";
14+
import { useSentryErrorReport } from "@hooks/useSentryErrorReport";
1515

1616
const StyledContainer = styled.div`
1717
background-color: ${Color.WHITE};
@@ -50,6 +50,7 @@ const TalkDetailContainer: FC<React.PropsWithChildren<unknown>> = () => {
5050
<MeetingDetail
5151
speakers={sessionSpeakers}
5252
meeting={adaptedMeeting}
53+
openFeedbackId={conferenceData.openFeedbackId}
5354
/>
5455
)}
5556
{!isLoading &&

0 commit comments

Comments
 (0)