@@ -7,12 +7,13 @@ import { Transcriptions } from "./Transcriptions"
77import { Col , Container , Image , Row } from "../bootstrap"
88import { firestore } from "../firebase"
99import * as links from "../links"
10+ import { Back } from "../shared/CommonComponents"
1011
1112const ButtonContainer = styled . div `
1213 width: fit-content;
1314`
1415
15- export const CommitteeButton = styled . button `
16+ export const FeatureCalloutButton = styled . button `
1617 border-radius: 12px;
1718 font-size: 12px;
1819`
@@ -43,6 +44,11 @@ export const HearingDetails = ({
4344 hearingId : string | string [ ] | undefined
4445} ) => {
4546 const { t } = useTranslation ( [ "common" , "hearing" ] )
47+ const [ transcriptData , setTranscriptData ] = useState ( null )
48+
49+ const handleTranscriptData = ( data : any ) => {
50+ setTranscriptData ( data )
51+ }
4652
4753 const [ videoLoaded , setVideoLoaded ] = useState ( false )
4854 const handleVideoLoad = ( ) => {
@@ -85,30 +91,32 @@ export const HearingDetails = ({
8591
8692 return (
8793 < Container className = "mt-3 mb-3" >
88- < h1 >
89- { t ( "hearing" , { ns : "hearing" } ) } { hearingId }
90- </ h1 >
91-
92- < h5 className = { `mb-3` } > { description } </ h5 >
94+ < Row className = { `mb-3` } >
95+ < Col >
96+ < Back href = "/hearings" > { t ( "back_to_hearings" ) } </ Back >
97+ </ Col >
98+ </ Row >
9399
94- { committeeName ? (
95- < ButtonContainer >
100+ { transcriptData ? (
101+ < ButtonContainer className = { `mb-2` } >
96102 { /* ButtonContainer contrains clickable area of link so that it doesn't exceed
97103 the button and strech invisibly across the width of the page */ }
98- < links . External
99- href = { `https://malegislature.gov/Committees/Detail/ ${ committeeCode } / ${ generalCourtNumber } ` }
104+ < FeatureCalloutButton
105+ className = { `btn btn-secondary d-flex text-nowrap mt-1 mx-1 p-1 ` }
100106 >
101- < CommitteeButton
102- className = { `btn btn-secondary d-flex text-nowrap mt-1 mx-1 p-1` }
103- >
104- { committeeName }
105- </ CommitteeButton >
106- </ links . External >
107+ { " " }
108+ { t ( "video_and_transcription_feature_callout" , { ns : "hearing" } ) } { " " }
109+
110+ </ FeatureCalloutButton >
107111 </ ButtonContainer >
108112 ) : (
109113 < > </ >
110114 ) }
111115
116+ { committeeName ? < h1 > { committeeName } </ h1 > : < > </ > }
117+
118+ < h5 className = { `mb-3` } > { description } </ h5 >
119+
112120 < Row >
113121 < Col className = { `col-md-8 mt-4` } >
114122 < LegalContainer className = { `pb-2 rounded` } >
@@ -160,6 +168,7 @@ export const HearingDetails = ({
160168 ) }
161169
162170 < Transcriptions
171+ handleTranscriptData = { handleTranscriptData }
163172 setCurTimeVideo = { setCurTimeVideo }
164173 videoLoaded = { videoLoaded }
165174 videoRef = { videoRef }
0 commit comments