From b97d01e51964e02383659308a24443d728a24c66 Mon Sep 17 00:00:00 2001 From: Shubham Waje Date: Fri, 3 Feb 2023 18:55:53 +0530 Subject: [PATCH] Replace github login with google login: - Reason: FIREBASE ISSUE: https://github.com/firebase/firebase-js-sdk/issues/4256 - Add google icon - Handle navigator exception --- components/SigninButton.tsx | 14 ++++--- components/editor/SnippngControlHeader.tsx | 8 +++- components/icons/GoogleIcon.tsx | 35 ++++++++++++++++++ context/AuthContext.tsx | 43 ++++++++++++++++++++-- pages/profile.tsx | 9 ++++- 5 files changed, 96 insertions(+), 13 deletions(-) create mode 100644 components/icons/GoogleIcon.tsx diff --git a/components/SigninButton.tsx b/components/SigninButton.tsx index 6c052de..92d120a 100644 --- a/components/SigninButton.tsx +++ b/components/SigninButton.tsx @@ -1,16 +1,18 @@ import { useAuth } from "@/context/AuthContext"; import React from "react"; import Button from "./form/Button"; -import GithubIcon from "./icons/GithubIcon"; +import GoogleIcon from "./icons/GoogleIcon"; const SigninButton = () => { - const { loginWithGithub } = useAuth(); + const { loginWithGoogle } = useAuth(); return ( - + <> + + ); }; diff --git a/components/editor/SnippngControlHeader.tsx b/components/editor/SnippngControlHeader.tsx index aab964a..cd1cb66 100644 --- a/components/editor/SnippngControlHeader.tsx +++ b/components/editor/SnippngControlHeader.tsx @@ -136,8 +136,12 @@ const SnippngControlHeader = () => {