diff --git a/hosting/package-lock.json b/hosting/package-lock.json index 1c8096bf..97c04e60 100644 --- a/hosting/package-lock.json +++ b/hosting/package-lock.json @@ -677,9 +677,9 @@ "integrity": "sha512-zuWxyfXNbsKbm96HhXzainONPFqRcoZblQ++e9cAIGUuHfl2cFSBzW01jtesqWG/lqaUyX3H8O1y9oWboGNQBA==" }, "node_modules/@grpc/grpc-js": { - "version": "1.9.14", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.14.tgz", - "integrity": "sha512-nOpuzZ2G3IuMFN+UPPpKrC6NsLmWsTqSsm66IRfnBt1D4pwTqE27lmbpcPM+l2Ua4gE7PfjRHI6uedAy7hoXUw==", + "version": "1.9.15", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.15.tgz", + "integrity": "sha512-nqE7Hc0AzI+euzUwDAy0aY5hCp10r734gMGRdU+qOPX0XSceI2ULrcXB5U2xSc5VkWwalCj4M7GzCAygZl2KoQ==", "dependencies": { "@grpc/proto-loader": "^0.7.8", "@types/node": ">=12.12.47" @@ -5800,9 +5800,9 @@ } }, "node_modules/prosemirror-schema-list": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.3.0.tgz", - "integrity": "sha512-Hz/7gM4skaaYfRPNgr421CU4GSwotmEwBVvJh5ltGiffUJwm7C8GfN/Bc6DR1EKEp5pDKhODmdXXyi9uIsZl5A==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.4.0.tgz", + "integrity": "sha512-nZOIq/AkBSzCENxUyLm5ltWE53e2PLk65ghMN8qLQptOmDVixZlPqtMeQdiNw0odL9vNpalEjl3upgRkuJ/Jyw==", "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", diff --git a/hosting/src/app/(public)/auth/[authAction]/page.tsx b/hosting/src/app/(public)/auth/[authAction]/page.tsx index 51ed3066..023ed26b 100644 --- a/hosting/src/app/(public)/auth/[authAction]/page.tsx +++ b/hosting/src/app/(public)/auth/[authAction]/page.tsx @@ -1,6 +1,5 @@ "use client"; import "@/assets/scss/layout-authentication.scss"; -import ClientOnly from "@/components/ClientOnly"; import {useFirebaseUi} from "@/hooks/useFirebaseUi"; import Image from "next/image"; import {notFound, useParams} from "next/navigation"; @@ -37,9 +36,7 @@ export default function AuthPage() {
- -
- +
diff --git a/hosting/src/components/ClientOnly.tsx b/hosting/src/components/ClientOnly.tsx deleted file mode 100644 index 2e852b9e..00000000 --- a/hosting/src/components/ClientOnly.tsx +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; -import {useEffect, useState} from "react"; - -const ClientOnly: React.FC<{children: React.ReactNode}> = ({children}) => { - const [isClient, setIsClient] = useState(false); - - useEffect(() => { - setIsClient(window && typeof window !== "undefined"); - }, []); - - if (!isClient) return; - - return <>{children}; -}; - -export default ClientOnly; diff --git a/hosting/src/hooks/useFirebaseUi.tsx b/hosting/src/hooks/useFirebaseUi.tsx index 3fb0fa24..06446557 100644 --- a/hosting/src/hooks/useFirebaseUi.tsx +++ b/hosting/src/hooks/useFirebaseUi.tsx @@ -1,11 +1,11 @@ "use client"; import {firebaseAuth} from "@/plugins/firebase"; -import {AuthCredential, GoogleAuthProvider} from "firebase/auth"; import {auth as firebaseAuthUi} from "firebaseui"; +import {AuthCredential, GoogleAuthProvider} from "firebase/auth"; import "firebaseui/dist/firebaseui.css"; import {useEffect, useState} from "react"; -const firebaseUi = new firebaseAuthUi.AuthUI(firebaseAuth); +const firebaseUi = firebaseAuthUi.AuthUI.getInstance() || new firebaseAuthUi.AuthUI(firebaseAuth); export function useFirebaseUi() { const [isSignUp, setIsSignup] = useState(false); @@ -18,7 +18,7 @@ export function useFirebaseUi() { setIsLoading(false); setIsSignup(false); }; - }); + }, []); function renderFirebaseUi() { if (!window || typeof window === "undefined") return;