logout, hover transition and small fixes
This commit is contained in:
14
src/components/LogoutButton/LogoutButton.js
Normal file
14
src/components/LogoutButton/LogoutButton.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { auth } from '../../redux/outstaffingSlice';
|
||||
|
||||
import './logoutButton.css'
|
||||
|
||||
export const LogoutButton = () => {
|
||||
const dispatch = useDispatch();
|
||||
return (
|
||||
<div className='logout-button' onClick={()=>{localStorage.clear(); dispatch(auth(false));}}>
|
||||
<button>Выйти</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user