article form creator
This commit is contained in:
@@ -3,6 +3,7 @@ import { SecondaryButton } from "../../../components/button/SecondaryButton";
|
||||
import { useAppDispatch } from "../../../redux/hooks";
|
||||
import ArticleItem from "./ArticleItem";
|
||||
import { setMenuActivePage } from "../../../redux/slices/store";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
|
||||
export interface Article {
|
||||
@@ -15,6 +16,7 @@ export interface Article {
|
||||
const Articles = () => {
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const articles: Article[] = [
|
||||
{
|
||||
@@ -142,7 +144,7 @@ const Articles = () => {
|
||||
Статьи
|
||||
</div>
|
||||
<SecondaryButton
|
||||
onClick={() => { }}
|
||||
onClick={() => {navigate("/article/create")}}
|
||||
text="Создать статью"
|
||||
className="absolute right-0"
|
||||
/>
|
||||
|
||||
@@ -26,6 +26,7 @@ const Login = () => {
|
||||
// После успешного логина
|
||||
useEffect(() => {
|
||||
dispatch(setMenuActivePage("account"))
|
||||
console.log(submitClicked);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -35,6 +35,7 @@ const Register = () => {
|
||||
if (jwt) {
|
||||
navigate("/home");
|
||||
}
|
||||
console.log(submitClicked);
|
||||
}, [jwt]);
|
||||
|
||||
const handleRegister = () => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { cn } from "../../../lib/cn";
|
||||
import { Account } from "../../../assets/icons/auth";
|
||||
import { registerUser } from "../../../redux/slices/auth";
|
||||
import { PrimaryButton } from "../../../components/button/PrimaryButton";
|
||||
import { ReverseButton } from "../../../components/button/ReverseButton";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { PrimaryButton } from "../../../components/button/PrimaryButton";
|
||||
import { SecondaryButton } from "../../../components/button/SecondaryButton";
|
||||
import { Input } from "../../../components/input/Input";
|
||||
import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
|
||||
import { createGroup, deleteGroup, updateGroup } from "../../../redux/slices/groups";
|
||||
import { deleteGroup, updateGroup } from "../../../redux/slices/groups";
|
||||
|
||||
interface ModalUpdateProps {
|
||||
active: boolean;
|
||||
|
||||
Reference in New Issue
Block a user