diff --git a/src/components/transcript/transcript.tsx b/src/components/transcript/transcript.tsx
index 65bcebd..77e58bc 100644
--- a/src/components/transcript/transcript.tsx
+++ b/src/components/transcript/transcript.tsx
@@ -30,8 +30,7 @@ const translates = {
errorDescripton: Failed to load transcript,
attachTranscript: Bring Transcript back,
detachTranscript: Popout transcript,
- toSearchResult: Go to result,
- toSearchResultLabel: Click to jump to this point in the video
+ toSearchResult: Go to result
};
export interface TranscriptProps {
@@ -57,7 +56,6 @@ export interface TranscriptProps {
attachTranscript?: string;
detachTranscript?: string;
toSearchResult?: string;
- toSearchResultLabel?: string;
downloadDisabled: boolean;
onDownload: () => void;
printDisabled: boolean;
@@ -274,6 +272,24 @@ export class Transcript extends Component {
return styles.smallWidth;
};
+ private _renderJumpToSearchButton = () => {
+ const {toSearchResult, onJumpToSearchMatch} = this.props;
+ const {search, activeSearchIndex, totalSearchResults} = this.state;
+ if (!search || totalSearchResults === 0 || activeSearchIndex === 0) {
+ return null;
+ }
+ return (
+
+ );
+ };
+
private _renderHeader = () => {
const {
toggledWithEnter,
@@ -286,11 +302,8 @@ export class Transcript extends Component {
isLoading,
attachTranscript,
detachTranscript,
- toSearchResult,
- toSearchResultLabel,
onAttach,
- onDetach,
- onJumpToSearchMatch
+ onDetach
} = this.props;
const {search, activeSearchIndex, totalSearchResults} = this.state;
@@ -314,16 +327,7 @@ export class Transcript extends Component {
toggledWithEnter={toggledWithEnter}
kitchenSinkActive={kitchenSinkActive}
/>
- {search && activeSearchIndex && (
-
- )}
+ {this._renderJumpToSearchButton()}
{!detachMenuItem && this._renderDetachButton()}
{!kitchenSinkDetached && (