Open PaulPatterson48 opened 11 months ago
GIVEN: As a user who is logged in, I should not be able to see the authentication button and login via google.
Only place the SignOut button on the Nav bar so it is the only thing visible to the logged in user
components\forms\navbar.js, utils\data\auth.js
/ eslint-disable @next/next/no-img-element / / eslint-disable jsx-a11y/anchor-is-valid / import React from 'react'; import PropTypes from 'prop-types'; // import { userRouter } from 'next/router'; import Link from 'next/link'; import { Navbar, Container, Nav, Button, } from 'react-bootstrap'; import { signOut } from '../utils/auth';
export default function NavBar() { return (
); }
NavBar.propTypes = { user: PropTypes.shape({ displayName: PropTypes.string, photoURL: PropTypes.string, }).isRequired, };
import firebase from 'firebase/app'; import 'firebase/auth';
const signIn = () => { const provider = new firebase.auth.GoogleAuthProvider(); firebase.auth().signInWithPopup(provider); };
const signOut = () => { firebase.auth().signOut(); };
export { signIn, signOut };
I can Fix this .Please Assign an issue to me.
User Story
GIVEN: As a user who is logged in, I should not be able to see the authentication button and login via google.
Acceptance Criteria
Only place the SignOut button on the Nav bar so it is the only thing visible to the logged in user
Dependecies
components\forms\navbar.js, utils\data\auth.js
Dev Notes
/ eslint-disable @next/next/no-img-element / / eslint-disable jsx-a11y/anchor-is-valid / import React from 'react'; import PropTypes from 'prop-types'; // import { userRouter } from 'next/router'; import Link from 'next/link'; import { Navbar, Container, Nav, Button, } from 'react-bootstrap'; import { signOut } from '../utils/auth';
export default function NavBar() { return (
); }
NavBar.propTypes = { user: PropTypes.shape({ displayName: PropTypes.string, photoURL: PropTypes.string, }).isRequired, };
import firebase from 'firebase/app'; import 'firebase/auth';
const signIn = () => { const provider = new firebase.auth.GoogleAuthProvider(); firebase.auth().signInWithPopup(provider); };
const signOut = () => { firebase.auth().signOut(); };
export { signIn, signOut };