remove auth for dev
This commit is contained in:
@ -63,7 +63,7 @@ export const AuthBox = ({ title }) => {
|
||||
localStorage.setItem("role_status", res.status);
|
||||
localStorage.setItem(
|
||||
"access_token_expired_at",
|
||||
res.access_token_expired_at,
|
||||
res.access_token_expired_at
|
||||
);
|
||||
dispatch(auth(true));
|
||||
dispatch(setUserInfo(res));
|
||||
@ -79,9 +79,11 @@ export const AuthBox = ({ title }) => {
|
||||
<h2 className="auth-box__header">
|
||||
Вход <img src={authHead} alt="authImg" />
|
||||
</h2>
|
||||
<div className="auth-box__title">
|
||||
<span>{title}</span>
|
||||
</div>
|
||||
{title && (
|
||||
<div className="auth-box__title">
|
||||
<span>{title}</span>
|
||||
</div>
|
||||
)}
|
||||
<form ref={ref} className="auth-box__form">
|
||||
<label htmlFor="login">Ваш email *</label>
|
||||
<input id="login" type="text" name="username" placeholder="Логин" />
|
||||
|
@ -15,7 +15,8 @@
|
||||
letter-spacing: normal;
|
||||
line-height: 77.81px;
|
||||
text-align: left;
|
||||
margin-top: 164px;
|
||||
margin-top: 150px;
|
||||
margin-bottom: 30px;
|
||||
|
||||
span {
|
||||
color: #52b709;
|
||||
@ -88,12 +89,12 @@
|
||||
letter-spacing: normal;
|
||||
line-height: 19.2px;
|
||||
text-align: left;
|
||||
margin-bottom: 25px;
|
||||
margin-bottom: 10px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.inputWrapper {
|
||||
width: 366px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.eye {
|
||||
@ -203,9 +204,13 @@
|
||||
color: #000000;
|
||||
font-size: 17px;
|
||||
font-weight: 400;
|
||||
margin-top: 45px;
|
||||
margin-top: 35px;
|
||||
line-height: 32px;
|
||||
|
||||
@media (max-width: 700px) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span {
|
||||
cursor: pointer;
|
||||
color: #52b709;
|
||||
|
@ -79,7 +79,7 @@ footer {
|
||||
&__mail {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 13px;
|
||||
column-gap: 5px;
|
||||
|
||||
a {
|
||||
font-weight: 400;
|
||||
|
@ -1,9 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { getRole } from "@redux/roleSlice";
|
||||
|
||||
import { useLogout } from "@hooks/useLogout";
|
||||
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
@ -12,8 +9,6 @@ import "./logoutButton.scss";
|
||||
|
||||
export const LogoutButton = () => {
|
||||
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
||||
|
||||
const userRole = useSelector(getRole);
|
||||
const navigate = useNavigate();
|
||||
const { logout } = useLogout();
|
||||
|
||||
@ -24,7 +19,7 @@ export const LogoutButton = () => {
|
||||
setIsLoggingOut(true);
|
||||
logout();
|
||||
setIsLoggingOut(false);
|
||||
navigate(userRole === "ROLE_DEV" ? "/authdev" : "/auth");
|
||||
navigate("/auth");
|
||||
}}
|
||||
>
|
||||
{isLoggingOut ? <Loader /> : "Выйти"}
|
||||
|
@ -3,7 +3,6 @@ import { useDispatch, useSelector } from "react-redux";
|
||||
import { NavLink, useNavigate } from "react-router-dom";
|
||||
|
||||
import { auth, getProfileInfo, setProfileInfo } from "@redux/outstaffingSlice";
|
||||
import { getRole } from "@redux/roleSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
@ -15,7 +14,6 @@ export const ProfileHeader = () => {
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useDispatch();
|
||||
const profileInfo = useSelector(getProfileInfo);
|
||||
const userRole = useSelector(getRole);
|
||||
const [user] = useState(
|
||||
localStorage.getItem("role_status") === "18" ? "partner" : "developer",
|
||||
);
|
||||
@ -43,7 +41,7 @@ export const ProfileHeader = () => {
|
||||
localStorage.clear();
|
||||
dispatch(auth(false));
|
||||
setIsLoggingOut(false);
|
||||
navigate(userRole === "ROLE_DEV" ? "/authdev" : "/auth");
|
||||
navigate("/auth");
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user