diff --git a/src/modules/EventList/index.tsx b/src/modules/EventList/index.tsx
index 1e5a26dde..0eafdbfd3 100644
--- a/src/modules/EventList/index.tsx
+++ b/src/modules/EventList/index.tsx
@@ -97,7 +97,7 @@ export const EventListUI = (props: EventListUIProps): ReactElement => {
} = props;
if (event) {
- return ;
+ return ;
}
const wrapMsg = (msg: string) =>
{msg}
;
diff --git a/src/modules/Transcript/index.tsx b/src/modules/Transcript/index.tsx
index 7f95c4a58..ab0a3d2cd 100644
--- a/src/modules/Transcript/index.tsx
+++ b/src/modules/Transcript/index.tsx
@@ -736,9 +736,9 @@ function useAudioSync(
];
}
-function useSearchState(speakerTurns: SpeakerTurn[]) {
+function useSearchState(speakerTurns: SpeakerTurn[], initialSearchTerm = '') {
const { state, handlers } = useChangeHandlers({
- searchTerm: '',
+ searchTerm: initialSearchTerm,
});
// Track the current match id and use it to set the proper currentMatchRef for autoscrolling
@@ -845,13 +845,14 @@ function useSearchState(speakerTurns: SpeakerTurn[]) {
export interface TranscriptProps {
eventId: string;
onBack?: MouseEventHandler;
+ initialSearchTerm?: string;
}
/**
* Renders Transcript
*/
export const Transcript = (props: TranscriptProps): ReactElement => {
- const { eventId, onBack } = props;
+ const { eventId, onBack, initialSearchTerm } = props;
const { settings } = useSettings();
const eventUpdateQuery = useEventUpdates(eventId);
const eventQuery = useEventData(eventId, eventUpdateQuery);
@@ -869,7 +870,7 @@ export const Transcript = (props: TranscriptProps): ReactElement => {
startTime,
endTime,
] = useAudioSync(eventId, speakerTurns, eventQuery, audioPlayer);
- const searchState = useSearchState(speakerTurns);
+ const searchState = useSearchState(speakerTurns, initialSearchTerm);
// We need to set two separate refs to the scroll container, so this just wraps those 2 into 1 to pass to the
// scrollContiainer ref. May make this a helper hook at some point
const scrollContainerRef = useCallback(