Переписываю спорные решения
Фикс отправки отчета, проверка на массив в map в Description.js
This commit is contained in:
@ -14,18 +14,17 @@ export const LogoutButton = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<div className='logout-button'>
|
||||
<button
|
||||
onClick={() => {
|
||||
setIsLoggingOut(true);
|
||||
localStorage.clear();
|
||||
dispatch(auth(false));
|
||||
setIsLoggingOut(false);
|
||||
navigate(userRole === 'ROLE_DEV' ? '/authdev' : '/auth')
|
||||
}}
|
||||
>
|
||||
{isLoggingOut ? <Loader/> : 'Выйти'}{' '}
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className='logout-button'
|
||||
onClick={() => {
|
||||
setIsLoggingOut(true);
|
||||
localStorage.clear();
|
||||
dispatch(auth(false));
|
||||
setIsLoggingOut(false);
|
||||
navigate(userRole === 'ROLE_DEV' ? '/authdev' : '/auth')
|
||||
}}
|
||||
>
|
||||
{isLoggingOut ? <Loader/> : 'Выйти'}
|
||||
</button>
|
||||
)
|
||||
};
|
||||
|
@ -1,40 +1,27 @@
|
||||
.logout-button {
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
right: 2.5rem;
|
||||
z-index: 100;
|
||||
|
||||
button {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
width: 131px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
font-family: 'Muller';
|
||||
font-size: 1.6em;
|
||||
letter-spacing: 0.8px;
|
||||
background-color: #6aaf5c;
|
||||
color: #ffffff;
|
||||
border: 3px solid #6aaf5c;
|
||||
font-family: 'Muller';
|
||||
text-align: center;
|
||||
}
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
width: 131px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
font-size: 1.6em;
|
||||
letter-spacing: 0.8px;
|
||||
background-color: #6aaf5c;
|
||||
color: #ffffff;
|
||||
border: 3px solid #6aaf5c;
|
||||
font-family: 'Muller', sans-serif;
|
||||
text-align: center;
|
||||
|
||||
&:hover {
|
||||
button {
|
||||
background-color: #ffffff;
|
||||
color: #6aaf5c;
|
||||
border: 3px solid #6aaf5c;
|
||||
box-shadow: 3px 2px 5px rgba(82, 151, 34, 0.21);
|
||||
transition: 0.3s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
.logout-button {
|
||||
top: 16px !important;
|
||||
background-color: #ffffff;
|
||||
color: #6aaf5c;
|
||||
border: 3px solid #6aaf5c;
|
||||
box-shadow: 3px 2px 5px rgba(82, 151, 34, 0.21);
|
||||
transition: 0.3s;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user