Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format code with prettier #204

Merged
merged 1 commit into from
Feb 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 33 additions & 27 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import React, { useState, useEffect, useMemo } from "react";
import Post from "./components/Post";
import { db, auth, storage, googleProvider, facebookProvider } from "./lib/firebase";
import {
db,
auth,
storage,
googleProvider,
facebookProvider,
} from "./lib/firebase";
import {
Modal,
Button,
Expand Down Expand Up @@ -244,13 +250,13 @@ function App() {
variant: "info",
});
};
const signInWithGoogle = (e) =>{

const signInWithGoogle = (e) => {
e.preventDefault();
setLoggingIn(true);
auth
.signInWithPopup(googleProvider)
.then(() => {
.signInWithPopup(googleProvider)
.then(() => {
enqueueSnackbar("Login successful!", {
variant: "success",
});
Expand All @@ -264,14 +270,14 @@ function App() {
.finally(() => {
setLoggingIn(false);
});
}
};

const signInWithFacebook = (e) =>{
const signInWithFacebook = (e) => {
e.preventDefault();
setLoggingIn(true);
auth
.signInWithPopup(facebookProvider)
.then(() => {
.signInWithPopup(facebookProvider)
.then(() => {
enqueueSnackbar("Login successful!", {
variant: "success",
});
Expand All @@ -285,7 +291,7 @@ function App() {
.finally(() => {
setLoggingIn(false);
});
}
};

return (
<div className="app">
Expand Down Expand Up @@ -481,23 +487,23 @@ function App() {
Sign In
</AnimatedButton>
<AnimatedButton
type="submit"
onClick={signInWithGoogle}
variant="contained"
color="primary"
sx={buttonStyle}
>
Sign In With Google
</AnimatedButton>
<AnimatedButton
type="submit"
onClick={signInWithFacebook}
variant="contained"
color="primary"
sx={buttonStyle}
>
Sign In With Facebook
</AnimatedButton>
type="submit"
onClick={signInWithGoogle}
variant="contained"
color="primary"
sx={buttonStyle}
>
Sign In With Google
</AnimatedButton>
<AnimatedButton
type="submit"
onClick={signInWithFacebook}
variant="contained"
color="primary"
sx={buttonStyle}
>
Sign In With Facebook
</AnimatedButton>
</form>
</div>
</Modal>
Expand Down