PaulPatterson48 / INDIVIDUAL-ASSIGNMENT-Team-Roster

0 stars 0 forks source link

Add only the SignOut button to the Nav bar #4

Open PaulPatterson48 opened 11 months ago

PaulPatterson48 commented 11 months ago

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 (

📚 Simply Books 📚

); }

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 };

Ronixa584 commented 11 months ago

I can Fix this .Please Assign an issue to me.