Skip to content

Commit 0e862aa

Browse files
committed
refactor: remove duplication
1 parent 2088fb6 commit 0e862aa

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

src/2023/TalkDetail/TalkDetail.tsx

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import {
44
MOBILE_BREAKPOINT,
55
} from "../../constants/BreakPoints";
66
import {Color} from "../../styles/colors";
7-
import {FC, Suspense, useEffect} from "react";
8-
import {IMeeting} from "./MeetingDetail.Type";
7+
import React, {FC, Suspense, useEffect} from "react";
98
import LessThanIconWhite from "../../assets/images/LessThanIconWhite.svg";
109
import LessThanIcon from "../../assets/images/LessThanBlueIcon.svg";
1110
import MoreThanIcon from "../../assets/images/MoreThanBlueIcon.svg";
@@ -35,7 +34,7 @@ import {
3534
} from "../../constants/routes";
3635
import conferenceData from "../../data/2023.json";
3736
import {Tag} from "../../components/Tag/Tag";
38-
import {ISpeaker} from "../../types/speakers";
37+
import {IMeetingDetailProps, MyType} from "../../types/sessions";
3938

4039
const getVideoHeight = (windowWidth: number) => {
4140
let videoHeight;
@@ -97,24 +96,6 @@ const opacityVariants = {
9796
},
9897
};
9998

100-
interface IMeetingDetailProps {
101-
meeting: IMeeting;
102-
speakers?: ISpeaker[];
103-
}
104-
105-
type MyType = {
106-
urlName?: string;
107-
videoUrl?: string;
108-
level?: string;
109-
videoTags?: string[];
110-
speakers?: ISpeaker[];
111-
description: string;
112-
language?: string;
113-
title: string;
114-
type?: string;
115-
track?: string;
116-
};
117-
11899
const TalkDetail: FC<React.PropsWithChildren<IMeetingDetailProps>> = ({
119100
meeting,
120101
speakers: mySpeakers,

src/services/sessionsAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {IMeeting} from "../views/MeetingDetail/MeetingDetail.Type";
21
import {
32
CategoryItemEnum,
3+
IMeeting,
44
QuestionAnswers,
55
Session,
66
SessionCategory

0 commit comments

Comments
 (0)