move hooks to login file
This commit is contained in:
1 parent
781854d85c
commit
235fc979b2
5 files changed
+7
-7
No files matched your search
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { login } from "../../../Features/Auth/authSlice";
|
import { login } from "../../../../Features/Auth/authSlice";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../../Utils/toastUtils";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const useLoginSubmit = () => {
|
const useLoginSubmit = () => {
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { loginCredentials } from "../../../Validation/validation";
|
import { loginCredentials } from "../../../../Validation/validation";
|
||||||
|
|
||||||
const useValidateLoginForm = () => {
|
const useValidateLoginForm = () => {
|
||||||
const [errors, setErrors] = useState({
|
const [errors, setErrors] = useState({
|
||||||
@@ -8,10 +8,10 @@ import AuthPageWrapper from "../components/AuthPageWrapper";
|
|||||||
// Utils
|
// Utils
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import useLoginForm from "../hooks/useLoginForm";
|
import useLoginForm from "./hooks/useLoginForm";
|
||||||
import useValidateLoginForm from "../hooks/useValidateLoginForm";
|
import useValidateLoginForm from "./hooks/useValidateLoginForm";
|
||||||
import useLoginSubmit from "../hooks/useLoginSubmit";
|
import useLoginSubmit from "./hooks/useLoginSubmit";
|
||||||
import useLoadingSubmit from "../hooks/useLoadingSubmit";
|
import useLoadingSubmit from "./hooks/useLoadingSubmit";
|
||||||
|
|
||||||
const Login = () => {
|
const Login = () => {
|
||||||
// Hooks
|
// Hooks
|
||||||
|
|||||||
Reference in new issue
Block a user