@@ -3,13 +3,13 @@ import {
3
3
LARGE_BREAKPOINT ,
4
4
MOBILE_BREAKPOINT ,
5
5
} from "../../constants/BreakPoints" ;
6
- import { Color } from "../../styles/colors" ;
7
- import React , { FC , Suspense , useEffect } from "react" ;
6
+ import { Color } from "../../styles/colors" ;
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" ;
11
11
import SectionWrapper from "../../components/SectionWrapper/SectionWrapper" ;
12
- import { useWindowSize } from "react-use" ;
12
+ import { useWindowSize } from "react-use" ;
13
13
import {
14
14
StyledContainer ,
15
15
StyledDescription ,
@@ -27,14 +27,15 @@ import {
27
27
StyledVideoContainer ,
28
28
StyledVideoTagsContainer ,
29
29
} from "./Style.MeetingDetail" ;
30
- import { Link } from "react-router" ;
30
+ import { Link } from "react-router" ;
31
31
import {
32
32
ROUTE_2023_SPEAKER_DETAIL ,
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 "../../hooks/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 ,
@@ -135,12 +134,20 @@ const TalkDetail: FC<React.PropsWithChildren<IMeetingDetailProps>> = ({
135
134
{ meeting . track }
136
135
137
136
{ meeting . slidesURL !== "" && (
138
- < p style = { { textAlign : "left" , marginTop : "0.6rem" } } >
137
+ < p
138
+ style = { {
139
+ textAlign : "left" ,
140
+ marginTop : "0.6rem" ,
141
+ } }
142
+ >
139
143
< a
140
144
href = { meeting . slidesURL }
141
145
target = "_blank"
142
146
rel = "noreferrer"
143
- style = { { textDecoration : "none" , color : Color . DARK_BLUE } }
147
+ style = { {
148
+ textDecoration : "none" ,
149
+ color : Color . DARK_BLUE ,
150
+ } }
144
151
>
145
152
< svg
146
153
xmlns = "http://www.w3.org/2000/svg"
@@ -185,9 +192,7 @@ const TalkDetail: FC<React.PropsWithChildren<IMeetingDetailProps>> = ({
185
192
> </ iframe >
186
193
) }
187
194
< StyledVideoTagsContainer >
188
- { meeting . videoTags ?. map ( ( tag ) => (
189
- < Tag text = { tag } key = { tag } />
190
- ) ) }
195
+ { meeting . videoTags ?. map ( ( tag ) => < Tag text = { tag } key = { tag } /> ) }
191
196
</ StyledVideoTagsContainer >
192
197
< div style = { { width : "100%" , textAlign : "center" } } >
193
198
< Link
0 commit comments