File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ const MainCaptionContent: React.FC<{ captions: CaptionMessage[] }> = ({
114
114
key = { `${ caption . sequence_id } -${ caption . source } ` }
115
115
fontWeight = { caption . is_partial ? 600 : 400 }
116
116
color = { i === 0 && ! caption . is_partial ? "#707070" : "inherit" }
117
+ marginRight = { "1.5rem" }
117
118
>
118
119
{ caption . transcript } { " " }
119
120
</ Text >
Original file line number Diff line number Diff line change 1
1
import React , { useCallback , useMemo } from "react" ;
2
+ import { useSearchParams } from "react-router-dom" ;
2
3
3
4
import { Box , Skeleton , Text } from "@chakra-ui/react" ;
4
5
@@ -44,8 +45,14 @@ export const TrackCaption: React.FC<Props> = ({ track }) => {
44
45
export const TrackCaptionInner : React . FC < {
45
46
track : TrackSlug ;
46
47
captions : CaptionMessage [ ] ;
47
- } > = ( { captions } ) => {
48
+ } > = ( { captions : origCaptions } ) => {
48
49
const box = React . useRef < HTMLDivElement > ( null ) ;
50
+ const [ searchParams ] = useSearchParams ( ) ;
51
+ const hidePartial = ! ! searchParams . get ( "hide_partial" ) ;
52
+
53
+ const captions = hidePartial
54
+ ? origCaptions . filter ( ( v ) => ! v . is_partial )
55
+ : origCaptions ;
49
56
50
57
const lastcaption =
51
58
captions . length > 0 ? captions [ captions . length - 1 ] : undefined ;
You can’t perform that action at this time.
0 commit comments