mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
isClient hack removal and type adjustment for "older" lib
This commit is contained in:
@@ -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>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -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 ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user