From 81dbdc871251e4bd5df0a0a4aa49835d4dff41ea Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 27 Sep 2023 19:38:56 +0200 Subject: [PATCH] hide qr on small screens --- www/app/transcripts/[transcriptId]/page.tsx | 10 +++++++--- www/app/transcripts/useWebSockets.ts | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/www/app/transcripts/[transcriptId]/page.tsx b/www/app/transcripts/[transcriptId]/page.tsx index ba09e3dd..84e1d1b8 100644 --- a/www/app/transcripts/[transcriptId]/page.tsx +++ b/www/app/transcripts/[transcriptId]/page.tsx @@ -63,9 +63,13 @@ export default function TranscriptDetails(details: TranscriptDetails) { )} -
-
- +
+
+
diff --git a/www/app/transcripts/useWebSockets.ts b/www/app/transcripts/useWebSockets.ts index cc5a6dde..75bf8edd 100644 --- a/www/app/transcripts/useWebSockets.ts +++ b/www/app/transcripts/useWebSockets.ts @@ -31,7 +31,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => { const text = textQueue[0]; setTranscriptText(text); - const WPM_READING = 200 + (textQueue.length * 10); // words per minute to read + const WPM_READING = 200 + textQueue.length * 10; // words per minute to read const wordCount = text.split(/\s+/).length; const delay = (wordCount / WPM_READING) * 60 * 1000; console.log(`displaying "${text}" for ${delay}ms`);