diff --git a/apps/readest-app/src/app/auth/page.tsx b/apps/readest-app/src/app/auth/page.tsx index 4743651f..aef45702 100644 --- a/apps/readest-app/src/app/auth/page.tsx +++ b/apps/readest-app/src/app/auth/page.tsx @@ -17,6 +17,7 @@ import { isTauriAppPlatform } from '@/services/environment'; import { open } from '@tauri-apps/plugin-shell'; import { start, cancel, onUrl, onInvalidUrl } from '@fabianlars/tauri-plugin-oauth'; import { handleAuthCallback } from '@/helpers/auth'; +import { IoArrowBack } from 'react-icons/io5'; type OAuthProvider = 'google' | 'apple' | 'azure' | 'github'; @@ -48,6 +49,7 @@ export default function AuthPage() { const { isDarkMode } = useTheme(); const [port, setPort] = useState(null); const isOAuthServerRunning = useRef(false); + const [isMounted, setIsMounted] = useState(false); const signIn = async (provider: OAuthProvider) => { if (!supabase) { @@ -134,8 +136,19 @@ export default function AuthPage() { // eslint-disable-next-line react-hooks/exhaustive-deps }, [router]); + useEffect(() => { + setIsMounted(true); + }, []); + + if (!isMounted) { + return null; + } + return isTauriAppPlatform() ? (
+
) : ( -
+
+