From 60ce765193eb17e1986cd5bb02ceb6379995d833 Mon Sep 17 00:00:00 2001 From: adueck Date: Mon, 4 Dec 2023 21:17:50 +0400 Subject: [PATCH] also allow clicking to hear audio on search results --- website/src/components/Entry.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/website/src/components/Entry.tsx b/website/src/components/Entry.tsx index 58fffff..6511ffc 100644 --- a/website/src/components/Entry.tsx +++ b/website/src/components/Entry.tsx @@ -8,6 +8,7 @@ import ExtraEntryInfo from "../components/ExtraEntryInfo"; import classNames from "classnames"; import { Types as T, InlinePs } from "@lingdocs/ps-react"; +import playStorageAudio from "./PlayStorageAudio"; function Entry({ entry, @@ -20,6 +21,12 @@ function Entry({ nonClickable?: boolean; isolateEntry?: (ts: number) => void; }) { + function handlePlayStorageAudio( + e: React.MouseEvent + ) { + e.stopPropagation(); + playStorageAudio(entry.ts, () => null); + } return (
{` `} {entry.c} - {entry.a && !nonClickable && } + {entry.a && !nonClickable && ( + + )}
{entry.e}