diff --git a/src/App.js b/src/App.js index 3fbf0de0..32a19073 100644 --- a/src/App.js +++ b/src/App.js @@ -8,8 +8,7 @@ import { import { getNotification } from "@redux/outstaffingSlice"; -import AuthForPartners from "./pages/AuthForPartners/AuthForPartners"; -import AuthForDevelopers from "./pages/AuthForDevelopers/AuthForDevelopers"; +import Auth from "./pages/Auth/Auth"; import { TrackerIntro } from "./pages/TrackerIntro/TrackerIntro" import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo"; import { TrackerAuth } from "@pages/TrackerAuth/TrackerAuth"; @@ -54,16 +53,13 @@ import "./assets/global.scss"; import "./assets/fonts/stylesheet.css"; import "bootstrap/dist/css/bootstrap.min.css"; - - const App = () => { const notification = useSelector(getNotification) return ( <> - } /> - } /> + } /> } /> } /> } /> diff --git a/src/components/AuthBox/AuthBox.jsx b/src/components/AuthBox/AuthBox.jsx index 284276b4..ce1452bc 100644 --- a/src/components/AuthBox/AuthBox.jsx +++ b/src/components/AuthBox/AuthBox.jsx @@ -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 }) => {

Вход authImg

-
- {title} -
+ {title && ( +
+ {title} +
+ )}
diff --git a/src/components/AuthBox/authBox.scss b/src/components/AuthBox/authBox.scss index 62142c35..519b3c09 100644 --- a/src/components/AuthBox/authBox.scss +++ b/src/components/AuthBox/authBox.scss @@ -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; diff --git a/src/components/Common/Footer/footer.scss b/src/components/Common/Footer/footer.scss index 962ec970..699e09b1 100644 --- a/src/components/Common/Footer/footer.scss +++ b/src/components/Common/Footer/footer.scss @@ -79,7 +79,7 @@ footer { &__mail { display: flex; align-items: center; - column-gap: 13px; + column-gap: 5px; a { font-weight: 400; diff --git a/src/components/LogoutButton/LogoutButton.jsx b/src/components/LogoutButton/LogoutButton.jsx index ad262aa8..16138ab0 100644 --- a/src/components/LogoutButton/LogoutButton.jsx +++ b/src/components/LogoutButton/LogoutButton.jsx @@ -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 ? : "Выйти"} diff --git a/src/components/ProfileHeader/ProfileHeader.jsx b/src/components/ProfileHeader/ProfileHeader.jsx index 97e23980..27847c93 100644 --- a/src/components/ProfileHeader/ProfileHeader.jsx +++ b/src/components/ProfileHeader/ProfileHeader.jsx @@ -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 ( diff --git a/src/hooks/useLogout.js b/src/hooks/useLogout.js index 0ad7c721..f76c0f7f 100644 --- a/src/hooks/useLogout.js +++ b/src/hooks/useLogout.js @@ -1,18 +1,16 @@ -import { useDispatch, useSelector } from "react-redux"; +import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; import { auth } from "../redux/outstaffingSlice"; -import { getRole } from "../redux/roleSlice"; export const useLogout = () => { const dispatch = useDispatch(); - const userRole = useSelector(getRole); const navigate = useNavigate(); const logout = () => { localStorage.clear(); dispatch(auth(false)); - navigate(userRole === "ROLE_DEV" ? "/authdev" : "/auth"); + navigate("/auth"); }; return { logout }; diff --git a/src/pages/AuthForPartners/AuthForPartners.jsx b/src/pages/Auth/Auth.jsx similarity index 75% rename from src/pages/AuthForPartners/AuthForPartners.jsx rename to src/pages/Auth/Auth.jsx index f1a12061..a61533ab 100644 --- a/src/pages/AuthForPartners/AuthForPartners.jsx +++ b/src/pages/Auth/Auth.jsx @@ -1,18 +1,15 @@ import React, { useEffect } from "react"; import { useSelector } from "react-redux"; -import { Link, useNavigate } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; import { selectAuth } from "@redux/outstaffingSlice"; -import { scrollToForm } from "@utils/helper"; - import { AuthBox } from "@components/AuthBox/AuthBox"; import AuthHeader from "@components/Common/AuthHeader/AuthHeader"; import { Footer } from "@components/Common/Footer/Footer"; import SideBar from "@components/SideBar/SideBar"; import SliderWorkers from "@components/SliderWorkers/SliderWorkers"; -import arrowBtn from "assets/icons/arrows/arrowRight.svg"; import arrow from "assets/icons/arrows/arrow__login_page.png"; import text from "assets/images/Body_Text.png"; import vector from "assets/images/Vector_Smart_Object.png"; @@ -20,9 +17,9 @@ import vectorBlack from "assets/images/Vector_Smart_Object_black.png"; import authImg from "assets/images/auth_img.png"; import cross from "assets/images/cross.png"; -import "./authForPartners.scss"; +import "./auth.scss"; -const AuthForPartners = () => { +const Auth = () => { const isAuth = useSelector(selectAuth); let navigate = useNavigate(); @@ -46,28 +43,10 @@ const AuthForPartners = () => {
-
-
scrollToForm()}> - -
-
- - - - - - -
-
-
- +
@@ -90,7 +69,6 @@ const AuthForPartners = () => {
- {/* */} -

- 300 Специалистов -

-
-
- -
    -
  • - Ruby on Rails -
  • -
  • PHP
  • -
  • Python
  • -
  • Vue.js
  • -
  • React. JS
  • -
-
- - - - - -