From db3a06c160f24f3c8e643ed35e60da30e2915778 Mon Sep 17 00:00:00 2001 From: Robert Lucas <100799838+Robert-M-Lucas@users.noreply.github.com> Date: Sun, 28 Apr 2024 15:16:07 +0100 Subject: [PATCH] Removed useless console logs --- src/utils/authentication.ts | 9 +++------ src/utils/user_prefs.test.ts | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/utils/authentication.ts b/src/utils/authentication.ts index d175301..d5ba1d4 100644 --- a/src/utils/authentication.ts +++ b/src/utils/authentication.ts @@ -1,18 +1,15 @@ -import { GoogleAuthProvider } from "firebase/auth"; +import {GoogleAuthProvider, signInWithPopup, User} from "firebase/auth"; import {auth} from "./firebase.ts"; -import { signInWithPopup } from "firebase/auth"; // Initialize a new Google Auth Provider const googleProvider = new GoogleAuthProvider(); // Function to sign in with Google -export const signInWithGoogle = async (): Promise => { +export const signInWithGoogle = async (): Promise => { try { const result = await signInWithPopup(auth, googleProvider); - const user = result.user; - console.log(user); // Return the entire user object - return user; + return result.user; } catch (error) { console.error(error); // Return null if there was an error diff --git a/src/utils/user_prefs.test.ts b/src/utils/user_prefs.test.ts index ebb7bf4..bc8f7f1 100644 --- a/src/utils/user_prefs.test.ts +++ b/src/utils/user_prefs.test.ts @@ -28,9 +28,6 @@ describe("Firestore UserPrefs Tests", () => { // @ts-expect-error const read_prefs = await getUserPrefs(user); - console.log(new_prefs); - console.log(read_prefs); - - expect(_.isEqual(read_prefs, prefs), "UserPref changes to be read").toBeTruthy(); + expect(_.isEqual(read_prefs, new_prefs), "UserPref changes to be read").toBeTruthy(); }); }); \ No newline at end of file