+
diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx b/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx
index 0145774e..3f6d9fc7 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx
@@ -1,9 +1,9 @@
import { useNavigate } from 'react-router-dom';
import Button from '../../components/Common/Button';
-import Checkbox from '../../components/Common/Checkbox';
import Dropdown from '../../components/Common/Dropdown';
import DropdownButton from '../../components/Common/DropdownButton';
+import DropdownCheckbox from '../../components/Common/DropdownCheckbox';
import { CloneIcon, CrownIcon, DownloadIcon, DumpBinIcon, EyeIcon, EyeOffIcon, MenuIcon, PenIcon, PlusIcon, ShareIcon, UploadIcon } from '../../components/Icons';
import { useAuth } from '../../context/AuthContext';
import { useRSForm } from '../../context/RSFormContext';
@@ -131,7 +131,7 @@ function RSTabsMenu({
@@ -142,22 +142,18 @@ function RSTabsMenu({
{(isOwned || user?.is_staff) &&
-
-
- }
+
}
{user?.is_staff &&
-
-
- }
+
}
}
diff --git a/rsconcept/frontend/src/pages/RegisterPage.tsx b/rsconcept/frontend/src/pages/RegisterPage.tsx
index d5133fab..9345871a 100644
--- a/rsconcept/frontend/src/pages/RegisterPage.tsx
+++ b/rsconcept/frontend/src/pages/RegisterPage.tsx
@@ -1,8 +1,9 @@
import { useEffect, useState } from 'react';
-import { useNavigate } from 'react-router-dom';
+import { useLocation, useNavigate } from 'react-router-dom';
import { toast } from 'react-toastify';
import BackendError from '../components/BackendError';
+import Button from '../components/Common/Button';
import Form from '../components/Common/Form';
import SubmitButton from '../components/Common/SubmitButton';
import TextInput from '../components/Common/TextInput';
@@ -10,6 +11,7 @@ import { useAuth } from '../context/AuthContext';
import { type IUserSignupData } from '../utils/models';
function RegisterPage() {
+ const location = useLocation();
const navigate = useNavigate();
const { user, signup, loading, error, setError } = useAuth();
@@ -24,6 +26,14 @@ function RegisterPage() {
setError(undefined);
}, [username, email, password, password2, setError]);
+ function handleCancel() {
+ if (location.key !== "default") {
+ navigate(-1);
+ } else {
+ navigate('/library');
+ }
+ }
+
function handleSubmit(event: React.FormEvent
) {
event.preventDefault();
if (!loading) {
@@ -48,7 +58,7 @@ function RegisterPage() {
{`Вы вошли в систему как ${user.username}. Если хотите зарегистрировать нового пользователя, выйдите из системы (меню в правом верхнем углу экрана)`}}
{ !user &&