Added sign out button to user page

This commit is contained in:
2023-07-27 20:07:25 +03:00
parent d93b2e131c
commit 50c2b0a615
7 changed files with 52 additions and 12 deletions

View File

@ -0,0 +1,22 @@
import { Navbar } from 'react-bootstrap'
import { Link } from 'react-router-dom'
import { CSSProperties } from 'react'
import { clearToken } from '../utils/auth'
import signOutIcon from '../assets/signOut.svg'
const styles = {
rightIcon: {
marginLeft: '1rem',
marginRight: 0
} as CSSProperties,
}
const SignOut = () => (
<Navbar.Brand style={styles.rightIcon} as={Link} to='/'>
<img onClick={clearToken} src={signOutIcon} alt='Выйти' />
</Navbar.Brand>
)
export default SignOut