Remove "Sign in" button from header
Some checks failed
Running Code Coverage / build (16.x) (push) Failing after 18s
Some checks failed
Running Code Coverage / build (16.x) (push) Failing after 18s
Because we don't have a login page
This commit is contained in:
parent
6b7cecd27b
commit
d5cdf50dbd
@ -2,12 +2,9 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
|
||||
import { isAuthenticated, isAuthenticationEnabled, logoutUser } from '../../utilities/authUtilities';
|
||||
|
||||
// components
|
||||
import { AppBar, Toolbar, Grid, Button } from '@mui/material';
|
||||
import { AppBar, Toolbar, Grid } from '@mui/material';
|
||||
import SearchSuggestion from './SearchSuggestion';
|
||||
import UserAccountMenu from './UserAccountMenu';
|
||||
// styling
|
||||
import makeStyles from '@mui/styles/makeStyles';
|
||||
import logo from '!file-loader!../../assets/Alt_Linux_Team.svg';
|
||||
@ -137,10 +134,6 @@ function Header({ setSearchCurrentValue = () => {} }) {
|
||||
const classes = useStyles();
|
||||
const path = useLocation().pathname;
|
||||
|
||||
const handleSignInClick = () => {
|
||||
logoutUser();
|
||||
};
|
||||
|
||||
return (
|
||||
<AppBar position={show ? 'fixed' : 'absolute'} sx={{ height: '5rem' }}>
|
||||
<Toolbar className={classes.header}>
|
||||
@ -179,18 +172,6 @@ function Header({ setSearchCurrentValue = () => {} }) {
|
||||
<img alt="github repository" src={githubLogo} className={classes.ghlogo} />
|
||||
</a>
|
||||
</Grid>
|
||||
{isAuthenticated() && isAuthenticationEnabled() && (
|
||||
<Grid item>
|
||||
<UserAccountMenu />
|
||||
</Grid>
|
||||
)}
|
||||
{!isAuthenticated() && isAuthenticationEnabled() && (
|
||||
<Grid item>
|
||||
<Button className={classes.signInBtn} onClick={handleSignInClick}>
|
||||
Sign in
|
||||
</Button>
|
||||
</Grid>
|
||||
)}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Toolbar>
|
||||
|
Loading…
Reference in New Issue
Block a user