isClient hack removal and type adjustment for "older" lib

This commit is contained in:
Igor Loskutov
2025-06-18 17:34:48 -04:00
parent 9c20e8b9f6
commit 20d1d9fc0d
2 changed files with 1 additions and 11 deletions

View File

@@ -133,8 +133,6 @@ const ShareModal = (props: ShareModalProps) => {
setStream(val.toString()); setStream(val.toString());
}} }}
placeholder="Pick a stream" placeholder="Pick a stream"
onBlur={() => {}}
onFocus={() => {}}
/> />
</div> </div>
@@ -147,8 +145,6 @@ const ShareModal = (props: ShareModalProps) => {
value={topic} value={topic}
onChange={(val) => setTopic(val.toString())} onChange={(val) => setTopic(val.toString())}
placeholder="Pick a topic" placeholder="Pick a topic"
onBlur={() => {}}
onFocus={() => {}}
/> />
</div> </div>
)} )}

View File

@@ -44,11 +44,7 @@ import {
} from "@chakra-ui/react"; } from "@chakra-ui/react";
const TranscriptCreate = () => { const TranscriptCreate = () => {
const [isClient, setIsClient] = useState(false); const isClient = typeof window === 'undefined';
useEffect(() => {
// next SSR
setIsClient(true);
}, []);
const router = useRouter(); const router = useRouter();
const { isLoading, isAuthenticated } = useSessionStatus(); const { isLoading, isAuthenticated } = useSessionStatus();
const requireLogin = featureEnabled("requireLogin"); const requireLogin = featureEnabled("requireLogin");
@@ -183,8 +179,6 @@ const TranscriptCreate = () => {
value={targetLanguage} value={targetLanguage}
onChange={onLanguageChange} onChange={onLanguageChange}
placeholder="Choose your language" placeholder="Choose your language"
onBlur={() => {}}
onFocus={() => {}}
/> />
</Box> </Box>
{isClient && !loading ? ( {isClient && !loading ? (