change some files

This commit is contained in:
2026-06-02 17:08:52 +03:30
parent b8dc1d0e1b
commit cfb48c5bb0
76 changed files with 5204 additions and 2555 deletions

View File

@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Box, TextField, Typography, Button, Container } from "@mui/material";
import { useApplicantLogin } from "@/hooks/auth.hook";
import { toast } from "sonner";
import { handleAxiosError } from "@/core/utils";
import { handleAxiosError, handleLoginRedirect } from "@/core/utils";
import { useRouter } from "next/navigation";
export default function LoginLayout() {
@@ -13,11 +13,12 @@ export default function LoginLayout() {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
try {
await mutateAsync(nationalId);
const response = await mutateAsync(nationalId);
console.log("response => ",response)
if (isPending) {
toast.loading("در حال انتقال به فرم استخدامي");
}
router.push("/form");
handleLoginRedirect(router, response);
} catch (error) {
console.log(error);
toast.error(handleAxiosError(error));