fix
This commit is contained in:
@@ -67,7 +67,7 @@ const Login = () => {
|
||||
</div>
|
||||
<div className=" relative pointer-events-auto">
|
||||
<div>
|
||||
<div className="text-[40px] text-liquid-white font-bold h-[50px]">
|
||||
<div className="text-[35px] text-liquid-white font-bold h-[50px]">
|
||||
С возвращением
|
||||
</div>
|
||||
<div className="text-[18px] text-liquid-light font-bold h-[23px]">
|
||||
@@ -100,15 +100,8 @@ const Login = () => {
|
||||
error={getErrorPasswordMessage()}
|
||||
/>
|
||||
|
||||
<div className="flex justify-end mt-[10px]">
|
||||
<Link
|
||||
to={''}
|
||||
className={
|
||||
'text-liquid-brightmain text-[16px] h-[20px] transition-all hover:underline '
|
||||
}
|
||||
>
|
||||
Забыли пароль?
|
||||
</Link>
|
||||
<div className="flex justify-end mt-[10px] h-[20px]">
|
||||
|
||||
</div>
|
||||
|
||||
<div className="mt-[10px]">
|
||||
|
||||
@@ -9,7 +9,7 @@ import { registerUser } from '../../../redux/slices/auth';
|
||||
import { setMenuActivePage } from '../../../redux/slices/store';
|
||||
import { Balloon } from '../../../assets/icons/auth';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Checkbox } from '../../../components/checkbox/Checkbox';
|
||||
// import { Checkbox } from '../../../components/checkbox/Checkbox';
|
||||
|
||||
function isValidEmail(email: string): boolean {
|
||||
const pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
@@ -52,12 +52,13 @@ const Register = () => {
|
||||
const [password, setPassword] = useState<string>('');
|
||||
const [confirmPassword, setConfirmPassword] = useState<string>('');
|
||||
const [submitClicked, setSubmitClicked] = useState<boolean>(false);
|
||||
const [politicChecked, setPoliticChecked] = useState<boolean>(false);
|
||||
const [politicChecked, setPoliticChecked] = useState<boolean>(true);
|
||||
|
||||
const { status, jwt } = useAppSelector((state) => state.auth);
|
||||
// const { errors } = useAppSelector((state) => state.auth.register);
|
||||
|
||||
useEffect(() => {
|
||||
setPoliticChecked(true);
|
||||
dispatch(setMenuActivePage('account'));
|
||||
}, []);
|
||||
|
||||
@@ -142,7 +143,7 @@ const Register = () => {
|
||||
</div>
|
||||
<div className=" relative pointer-events-auto">
|
||||
<div>
|
||||
<div className="text-[40px] text-liquid-white font-bold h-[50px]">
|
||||
<div className="text-[35px] text-liquid-white font-bold h-[50px]">
|
||||
Добро пожаловать
|
||||
</div>
|
||||
<div className="text-[18px] text-liquid-light font-bold h-[23px]">
|
||||
@@ -200,7 +201,7 @@ const Register = () => {
|
||||
/>
|
||||
|
||||
<div className=" flex items-center mt-[10px] h-[24px]">
|
||||
<Checkbox
|
||||
{/* <Checkbox
|
||||
onChange={(value: boolean) => {
|
||||
setPoliticChecked(value);
|
||||
}}
|
||||
@@ -215,13 +216,13 @@ const Register = () => {
|
||||
/>
|
||||
<span className="text-[14px] font-medium text-liquid-light h-[18px] ml-[10px]">
|
||||
Я принимаю{' '}
|
||||
{/* <Link to={'/home'} className={' underline'}>
|
||||
<Link to={'/home'} className={' underline'}>
|
||||
политику конфиденциальности
|
||||
</Link> */}
|
||||
</Link>
|
||||
<span className={' underline cursor-pointer'}>
|
||||
политику конфиденциальности
|
||||
</span>
|
||||
</span>
|
||||
</span> */}
|
||||
</div>
|
||||
|
||||
<div className="mt-[10px]">
|
||||
|
||||
@@ -14,12 +14,15 @@ import {
|
||||
} from '../../../redux/slices/contests';
|
||||
import ModalCreateContest from './ModalCreate';
|
||||
import Filters from './Filter';
|
||||
import { toastWarning } from '../../../lib/toastNotification';
|
||||
|
||||
const Contests = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const [modalActive, setModalActive] = useState<boolean>(false);
|
||||
|
||||
const jwt = useAppSelector((state) => state.auth.jwt);
|
||||
|
||||
const { contests, status } = useAppSelector(
|
||||
(state) => state.contests.fetchContests,
|
||||
);
|
||||
@@ -49,6 +52,10 @@ const Contests = () => {
|
||||
</div>
|
||||
<SecondaryButton
|
||||
onClick={() => {
|
||||
if (!jwt){
|
||||
toastWarning("Для создания контеста необходимо авторизоваться")
|
||||
return;
|
||||
}
|
||||
setModalActive(true);
|
||||
}}
|
||||
text="Создать контест"
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
import { fetchMissions } from '../../../redux/slices/missions';
|
||||
import ModalCreate from './ModalCreate';
|
||||
import Filters from './Filter';
|
||||
import { toastWarning } from '../../../lib/toastNotification';
|
||||
|
||||
export interface Mission {
|
||||
id: number;
|
||||
@@ -29,6 +30,7 @@ const Missions = () => {
|
||||
|
||||
const missions = useAppSelector((state) => state.missions.missions);
|
||||
|
||||
const jwt = useAppSelector((state) => state.auth.jwt);
|
||||
const nameFilter = useAppSelector(
|
||||
(state) => state.store.missions.filterName,
|
||||
);
|
||||
@@ -60,6 +62,11 @@ const Missions = () => {
|
||||
</div>
|
||||
<SecondaryButton
|
||||
onClick={() => {
|
||||
|
||||
if (!jwt){
|
||||
toastWarning("Для загрузки задачи необходимо авторизоваться")
|
||||
return;
|
||||
}
|
||||
setModalActive(true);
|
||||
}}
|
||||
text="Добавить задачу"
|
||||
|
||||
Reference in New Issue
Block a user