Bugs fixed
parent
292037c4fc
commit
fb6f587981
|
|
@ -114,7 +114,12 @@ export default function Landing() {
|
|||
"
|
||||
key={index}
|
||||
href={item.link}
|
||||
onClick={() => localStorage.removeItem("Sootzani_Login_State")}
|
||||
onClick={() => {
|
||||
localStorage.removeItem("Sootzani_Login_State");
|
||||
if (index == 0) {
|
||||
localStorage.setItem("unknown", "true");
|
||||
}
|
||||
}}
|
||||
>
|
||||
<p className="text-xs text-center font-medium text-gray hidden group-hover:flex ">
|
||||
{item.description}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ export default function ProfileDropDown() {
|
|||
return (
|
||||
<DropdownMenu dir="rtl">
|
||||
<DropdownMenuTrigger className=" max-sm:-mr-8 max-sm:text-xs" asChild>
|
||||
<Button variant="outline">{profileData?.userName}</Button>
|
||||
<Button variant="outline">
|
||||
{profileData?.title ? profileData.title : profileData.userName}
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="w-56 sm:ml-10">
|
||||
<DropdownMenuGroup>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import { ThreeDots } from "react-loader-spinner";
|
|||
import useToken from "@/store/useToken";
|
||||
import { toast } from "sonner";
|
||||
import { RefreshCcw } from "lucide-react";
|
||||
import { getCookie } from "cookies-next";
|
||||
|
||||
const MAX_IMAGE_SIZE = 5242880; // 5 MB
|
||||
const ALLOWED_IMAGE_TYPES = [
|
||||
|
|
@ -117,9 +118,11 @@ export default function RequestStep2() {
|
|||
localStorage.setItem("password", res.password);
|
||||
router.push("/RequestResult");
|
||||
},
|
||||
onError: (error) => { toast("مشکلی در ارسال درخواست به وجود آمد.", {
|
||||
className: "!bg-red-500 !text-white",
|
||||
});},
|
||||
onError: (error) => {
|
||||
toast("مشکلی در ارسال درخواست به وجود آمد.", {
|
||||
className: "!bg-red-500 !text-white",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const authorizedComplaintSubmitMutation = useMutation({
|
||||
|
|
@ -190,7 +193,9 @@ export default function RequestStep2() {
|
|||
formData.append("Captcha.Key", CaptchaData?.headers["captcha-key"]);
|
||||
formData.append("Complaining", data.person ? data.person : "");
|
||||
formData.append("OrganizationId", data.OrganizationId);
|
||||
if (isAuth) {
|
||||
const unknown = localStorage.getItem("unknown");
|
||||
const isAuth = getCookie("Sootzani_Token");
|
||||
if (isAuth && !unknown) {
|
||||
authorizedComplaintSubmitMutation.mutate({
|
||||
Data: formData,
|
||||
});
|
||||
|
|
@ -199,6 +204,7 @@ export default function RequestStep2() {
|
|||
Data: formData,
|
||||
});
|
||||
}
|
||||
|
||||
refetch();
|
||||
resetField("Title");
|
||||
resetField("Text");
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sootzani",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.3.2",
|
||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
|
|
|||
Loading…
Reference in New Issue