remove tracker registration

This commit is contained in:
Victor Batischev 2024-03-19 14:07:41 +03:00
parent 3013dd1bd2
commit 923a84e488
6 changed files with 2 additions and 328 deletions

View File

@ -108,7 +108,7 @@ export const AuthBlock = ({ title, description, img, resetModal }) => {
> >
{isLoading ? <Loader /> : "Войти"} {isLoading ? <Loader /> : "Войти"}
</button> </button>
<NavLink to="/tracker-registration" className="auth__registration"> <NavLink to="/auth" className="auth__registration">
Регистрация Регистрация
</NavLink> </NavLink>
</div> </div>

View File

@ -111,13 +111,6 @@ export const AuthForCandidate = () => {
<div className="auth-candidate"> <div className="auth-candidate">
<AuthHeader /> <AuthHeader />
<div className="container"> <div className="container">
<AuthBlock
resetModal={setModalReset}
title="Войти, если есть доступ"
description="Если вы получили доступ, пройдя
2 шага для входа, или хотите узнать
свои результаты в кабинете"
/>
<div className="auth-candidate__start"> <div className="auth-candidate__start">
<h2 className="auth-candidate__start__title"> <h2 className="auth-candidate__start__title">
Хочу в команду <span>IT-специалистов</span> Хочу в команду <span>IT-специалистов</span>

View File

@ -57,7 +57,7 @@ export const TrackerIntro = () => {
Управление большим количеством проектов и гибкая настройка Управление большим количеством проектов и гибкая настройка
структуры под любые процессы структуры под любые процессы
</p> </p>
<NavLink to="/tracker-registration" className="tracker-intro__btn"> <NavLink to="/auth" className="tracker-intro__btn">
Начать работу Начать работу
</NavLink> </NavLink>
</div> </div>

View File

@ -1,163 +0,0 @@
import React, { useState } from "react";
import { Navigate } from "react-router-dom";
import { useFormValidation } from "@hooks/useFormValidation";
import { useNotification } from "@hooks/useNotification";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import BaseButton from "@components/Common/BaseButton/BaseButton";
import { Footer } from "@components/Common/Footer/Footer";
import { Loader } from "@components/Common/Loader/Loader";
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
import { ModalTrackerRegistration } from "@components/Modal/ModalTrackerRegistration/ModalTrackerRegistration";
import SideBar from "@components/SideBar/SideBar";
import arrowInfo from "assets/icons/trackerIntroInfo.svg";
import authImg from "assets/images/partnerProfile/authCandidateFormImg.png";
import registrationImg from "assets/images/trackerRegistrationImg.png";
import "./trackerRegistration.scss";
export const TrackerRegistration = () => {
const [modalConfirmOpen, setModalConfirm] = useState(false);
const [loader, setLoader] = useState(false);
const [isPartner, setIsPartner] = useState(false);
const fields = {
username: "",
email: "",
password: "",
secondPassword: ""
};
const apiEndpoint = "/register/sign-up";
const { showNotification } = useNotification();
const showNotificationError = (error) => {
showNotification({
show: true,
text: error,
type: "error"
});
};
const showNotificationTrue = () => {
showNotification({
show: true,
text: "Аккаунт успешно создан",
type: "success"
});
};
const { formData, validationErrors, handleChange, handleSubmit } =
useFormValidation(
apiEndpoint,
fields,
showNotificationError,
showNotificationTrue,
isPartner,
setLoader
);
return (
<div className="tracker-registration">
<AuthHeader />
<SideBar />
<div className="tracker-auth__content">
<div className="container">
<h1 className="tracker-auth__title">
Создайте свое{" "}
<span>
рабочее пространство
<img src={arrowInfo} alt="arrow" />
</span>
</h1>
<div className="tracker-registration__form">
<div className="tracker-registration__form__inputs">
<div className="tracker-registration__input-container">
<h5>Ваше имя</h5>
<input
placeholder="Имя"
className={validationErrors.username ? "error" : ""}
onChange={handleChange}
value={formData.username}
id="username"
/>
<span>{validationErrors.username}</span>
</div>
<div className="tracker-registration__input-container">
<h5>Ваш e-mail</h5>
<input
onChange={handleChange}
className={validationErrors.email ? "error" : ""}
placeholder="E-mail"
type="email"
id="email"
value={formData.email}
/>
<span>{validationErrors.email}</span>
</div>
<div className="tracker-registration__input-container">
<h5>Придумайте пароль</h5>
<input
placeholder="Пароль"
className={validationErrors.password ? "error" : ""}
onChange={handleChange}
value={formData.password}
type="password"
id="password"
/>
<span>{validationErrors.password}</span>
</div>
<div className="tracker-registration__input-container">
<h5>Повторите пароль</h5>
<input
placeholder="Повторите пароль"
className={validationErrors.secondPassword ? "error" : ""}
value={formData.secondPassword}
type="password"
onChange={handleChange}
id="secondPassword"
/>
<span>{validationErrors.secondPassword}</span>
</div>
</div>
<div className="tracker-registration__form__submit">
{loader ? (
<Loader />
) : (
<BaseButton
onClick={async (e) => {
e.preventDefault();
await handleSubmit(e);
}}
styles="button-box__submit"
>
Отправить
</BaseButton>
)}
<div className="tracker-registration__form__info">
<img src={authImg} alt="img" />
<p>
Создавайте и редактируйте задачи и проекты вместе с другими
участниками команды.
</p>
</div>
</div>
<img
className="tracker-registration__form__img"
src={registrationImg}
alt="img"
/>
</div>
</div>
{modalConfirmOpen && (
<ModalLayout active={modalConfirmOpen} setActive={setModalConfirm}>
<ModalTrackerRegistration
setModalReset={setModalConfirm}
email={formData.email}
/>
</ModalLayout>
)}
</div>
<Footer />
</div>
);
};

View File

@ -1,150 +0,0 @@
.tracker-registration {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #f1f1f1;
&__content {
display: flex;
flex-direction: column;
flex: 1;
color: #000000;
padding: 50px 0 0;
@media (max-width: 1375px) {
padding-top: 100px;
}
.container {
padding-bottom: 30px;
}
}
&__form {
position: relative;
border-radius: 12px;
background: #fff;
padding: 20px;
@media (max-width: 1000px) {
display: flex;
flex-direction: column;
padding: 0;
}
&__inputs {
display: flex;
flex-wrap: wrap;
max-width: 650px;
column-gap: 44px;
@media (max-width: 1000px) {
order: 2;
}
}
&__submit {
display: flex;
align-items: center;
margin-top: 5px;
button {
border-radius: 44px;
padding: 9px 39px;
background: #52b709;
font-weight: 500;
font-size: 18px;
color: #fff;
border: none;
max-width: 170px;
}
@media (max-width: 1000px) {
order: 3;
}
@media (max-width: 675px) {
flex-direction: column;
align-items: start;
row-gap: 35px;
}
.loader {
max-width: 170px;
}
}
&__info {
display: flex;
margin-left: 165px;
align-items: center;
img {
margin-right: 31px;
@media (max-width: 675px) {
margin-right: 27px;
}
}
p {
font-size: 16px;
font-weight: 400;
line-height: 22px;
color: #000;
max-width: 430px;
@media (max-width: 675px) {
font-size: 14px;
}
}
}
&__img {
position: absolute;
top: -100px;
right: 58px;
@media (max-width: 900px) {
display: none;
}
}
}
&__input-container {
display: flex;
flex-direction: column;
max-width: 300px;
width: 100%;
margin-bottom: 44px;
h5 {
font-size: 15px;
}
span {
font-weight: 400;
font-size: 12px;
color: red;
}
input {
outline: none;
padding: 8px 12px 9px;
background-color: #eff2f7;
border-radius: 8px;
margin: 10px 0;
border: none;
font-weight: 400;
font-size: 15px;
color: #000;
}
@media (max-width: 675px) {
margin-bottom: 0;
max-width: none;
}
.error {
border: 1px solid red;
}
}
}

View File

@ -15,7 +15,6 @@ import { RegistrationForCandidate } from "@pages/RegistrationForCandidate/Regist
import { RegistrationSetting } from "@pages/RegistrationSetting/RegistrationSetting"; import { RegistrationSetting } from "@pages/RegistrationSetting/RegistrationSetting";
import { SingleReportPage } from "@pages/SingleReportPage/SingleReportPage"; import { SingleReportPage } from "@pages/SingleReportPage/SingleReportPage";
import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro"; import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro";
import { TrackerRegistration } from "@pages/TrackerRegistration/TrackerRegistration";
import { FreeDevelopers } from "@components/FreeDevelopers/FreeDevelopers"; import { FreeDevelopers } from "@components/FreeDevelopers/FreeDevelopers";
@ -26,11 +25,6 @@ export const GuestPage = () => {
<Route path="*" element={<Navigate to="/auth" replace />} /> <Route path="*" element={<Navigate to="/auth" replace />} />
<Route exact path="/tracker-intro" element={<TrackerIntro />} /> <Route exact path="/tracker-intro" element={<TrackerIntro />} />
<Route exact path="/forms" element={<Forms />} /> <Route exact path="/forms" element={<Forms />} />
<Route
exact
path="/tracker-registration"
element={<TrackerRegistration />}
/>
<Route exact path="/company" element={<CompanyInfo />} /> <Route exact path="/company" element={<CompanyInfo />} />
<Route <Route
exact exact