From 20d1d9fc0d4abaa5d4b6bc62e81c31f17aed64ad Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Wed, 18 Jun 2025 17:34:48 -0400 Subject: [PATCH] isClient hack removal and type adjustment for "older" lib --- www/app/(app)/transcripts/[transcriptId]/shareModal.tsx | 4 ---- www/app/(app)/transcripts/new/page.tsx | 8 +------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/www/app/(app)/transcripts/[transcriptId]/shareModal.tsx b/www/app/(app)/transcripts/[transcriptId]/shareModal.tsx index 88851690..2e8e5ece 100644 --- a/www/app/(app)/transcripts/[transcriptId]/shareModal.tsx +++ b/www/app/(app)/transcripts/[transcriptId]/shareModal.tsx @@ -133,8 +133,6 @@ const ShareModal = (props: ShareModalProps) => { setStream(val.toString()); }} placeholder="Pick a stream" - onBlur={() => {}} - onFocus={() => {}} /> @@ -147,8 +145,6 @@ const ShareModal = (props: ShareModalProps) => { value={topic} onChange={(val) => setTopic(val.toString())} placeholder="Pick a topic" - onBlur={() => {}} - onFocus={() => {}} /> )} diff --git a/www/app/(app)/transcripts/new/page.tsx b/www/app/(app)/transcripts/new/page.tsx index a99af7be..07a3be93 100644 --- a/www/app/(app)/transcripts/new/page.tsx +++ b/www/app/(app)/transcripts/new/page.tsx @@ -44,11 +44,7 @@ import { } from "@chakra-ui/react"; const TranscriptCreate = () => { - const [isClient, setIsClient] = useState(false); - useEffect(() => { - // next SSR - setIsClient(true); - }, []); + const isClient = typeof window === 'undefined'; const router = useRouter(); const { isLoading, isAuthenticated } = useSessionStatus(); const requireLogin = featureEnabled("requireLogin"); @@ -183,8 +179,6 @@ const TranscriptCreate = () => { value={targetLanguage} onChange={onLanguageChange} placeholder="Choose your language" - onBlur={() => {}} - onFocus={() => {}} /> {isClient && !loading ? (