|
4 | 4 | MOBILE_BREAKPOINT, |
5 | 5 | } from "../../constants/BreakPoints"; |
6 | 6 | import {Color} from "../../styles/colors"; |
7 | | -import React, {FC, Suspense, useEffect} from "react"; |
| 7 | +import React, { FC, Suspense } from "react"; |
8 | 8 | import LessThanIconWhite from "../../assets/images/LessThanIconWhite.svg"; |
9 | 9 | import LessThanIcon from "../../assets/images/LessThanBlueIcon.svg"; |
10 | 10 | import MoreThanIcon from "../../assets/images/MoreThanBlueIcon.svg"; |
@@ -33,8 +33,9 @@ import { |
33 | 33 | ROUTE_2023_TALKS, |
34 | 34 | } from "../../constants/routes"; |
35 | 35 | import conferenceData from "../../data/2023.json"; |
36 | | -import {Tag} from "../../components/Tag/Tag"; |
37 | | -import {IMeetingDetailProps, MyType} from "../../types/sessions"; |
| 36 | +import { Tag } from "../../components/Tag/Tag"; |
| 37 | +import { IMeetingDetailProps, MyType } from "../../types/sessions"; |
| 38 | +import { useDocumentTitleUpdater } from "../../services/useDocumentTitleUpdate"; |
38 | 39 |
|
39 | 40 | const getVideoHeight = (windowWidth: number) => { |
40 | 41 | let videoHeight; |
@@ -102,9 +103,7 @@ const TalkDetail: FC<React.PropsWithChildren<IMeetingDetailProps>> = ({ |
102 | 103 | }) => { |
103 | 104 | const { width } = useWindowSize(); |
104 | 105 |
|
105 | | - useEffect(() => { |
106 | | - document.title = `${meeting.title} - DevBcn ${conferenceData.edition}`; |
107 | | - }, [meeting.title]); |
| 106 | + useDocumentTitleUpdater(meeting.title, conferenceData.edition); |
108 | 107 |
|
109 | 108 | const finalMeetingInfo: MyType = { |
110 | 109 | ...meeting, |
|
0 commit comments