a part of first page added and part of verify page add
parent
93b9cfd232
commit
0bd15b48ad
|
|
@ -0,0 +1 @@
|
|||
NEXT_PUBLIC_BASE_URL_APP="https://shahrbinapi.shetabdahi.ir/"
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
"extends": ["next/babel","next/core-web-vitals"]
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import Verify from '@/components/Verify/Verify'
|
||||
import React from 'react'
|
||||
|
||||
function page() {
|
||||
return (
|
||||
<Verify />
|
||||
)
|
||||
}
|
||||
|
||||
export default page
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import Provider from "../utils/ReactQuery/Provider";
|
||||
import { Toaster as SonnerToaster } from "@/components/ui/sonner";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
|
|
@ -16,7 +19,13 @@ export default function RootLayout({
|
|||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={inter.className}>{children}</body>
|
||||
<body className={inter.className}>
|
||||
<Provider>
|
||||
{children}
|
||||
<Toaster />
|
||||
<SonnerToaster />
|
||||
</Provider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,20 @@ import {
|
|||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { toast } from "sonner";
|
||||
import Image from "next/image";
|
||||
import { RefreshCcw } from "lucide-react";
|
||||
import { Oval, ThreeDots } from "react-loader-spinner";
|
||||
import img1 from "@/assets/images/direct.png";
|
||||
import Link from "next/link";
|
||||
import { getCaptcha } from "@/utils/commonApi";
|
||||
import { useRouter } from "next/navigation";
|
||||
import useData from "@/store/useData";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { logisterCitizen } from "@/utils/authenticateApi";
|
||||
|
||||
const formSchema = z.object({
|
||||
username: z.string({ required_error: "*فیلد اجباری*" }).max(11, {
|
||||
phoneNumber: z.string({ required_error: "*فیلد اجباری*" }).max(11, {
|
||||
message: "حداکثر تعداد کاراکتر 11 تا میباشد.",
|
||||
}),
|
||||
|
||||
|
|
@ -31,106 +37,157 @@ const formSchema = z.object({
|
|||
});
|
||||
|
||||
function LoginForm() {
|
||||
// 1. Define your form.
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
// defaultValues: {
|
||||
// username: "",
|
||||
const router = useRouter();
|
||||
const saveData = useData((state) => state.saveData);
|
||||
|
||||
const {
|
||||
data: CaptchaData,
|
||||
isLoading,
|
||||
refetch,
|
||||
} = useQuery({
|
||||
queryKey: ["Captcha"],
|
||||
queryFn: () => getCaptcha(),
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
|
||||
const loginMutation = useMutation({
|
||||
mutationFn: logisterCitizen,
|
||||
onSuccess: (res: any | string) => {
|
||||
localStorage.setItem("VerifyRole", "citizen");
|
||||
localStorage.setItem("verificationToken", res);
|
||||
},
|
||||
onError: (err: any | string) => {
|
||||
if (err.response.status == 428) {
|
||||
router.push("/Verify");
|
||||
}
|
||||
},
|
||||
|
||||
// onSuccess: (res: any | string) => {
|
||||
// router.push("/Verify");
|
||||
// localStorage.setItem("VerifyRole", "citizen");
|
||||
// localStorage.setItem("verificationToken", res);
|
||||
// },
|
||||
// onError: (err: any | string) => {
|
||||
// refetch();
|
||||
// toast(<>{err.response.data.detail}</>, {
|
||||
// className: "!bg-red-500 !text-white",
|
||||
// });
|
||||
// },
|
||||
});
|
||||
|
||||
// 1. Define your form.
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// Do something with the form values.
|
||||
// ✅ This will be type-safe and validated.
|
||||
console.log(values);
|
||||
function onSubmit(data: z.infer<typeof formSchema>) {
|
||||
const payload = {
|
||||
phoneNumber: data.phoneNumber,
|
||||
captcha: {
|
||||
key: CaptchaData?.headers["captcha-key"],
|
||||
value: data.captcha,
|
||||
},
|
||||
};
|
||||
loginMutation.mutateAsync(payload);
|
||||
saveData({
|
||||
phoneNumber: data.phoneNumber,
|
||||
});
|
||||
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
const srcForImage = CaptchaData
|
||||
? URL.createObjectURL(CaptchaData.data)
|
||||
: null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="w-1/2">
|
||||
{/* Phone Number */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-2">
|
||||
<FormLabel className="text-black text-lg">تلفن همراه</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="09"
|
||||
{...field}
|
||||
className="bg-white rounded-3xl focus:bg-white hover:bg-white text-center w-full"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage className="bg-red text-white text-sm p-1" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
{/* Capcha */}
|
||||
<div className="flex items-start justify-center h-20 mt-8">
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="w-1/2">
|
||||
{/* Phone Number */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="captcha"
|
||||
name="phoneNumber"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-2">
|
||||
<FormLabel className="text-black text-lg">تلفن همراه</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="عبارت امنیتی"
|
||||
placeholder="09"
|
||||
{...field}
|
||||
className="bg-white rounded-tr-3xl rounded-br-3xl focus:bg-white hover:bg-white text-center w-full h-10 m-0"
|
||||
className="bg-white rounded-3xl focus:bg-white hover:bg-white text-center w-full"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage className="bg-red text-white text-sm p-1 mb-4" />
|
||||
<FormMessage className="bg-red text-white text-sm p-1" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
{/* {isLoading ? (
|
||||
<div className="flex justify-center text-center w-36">
|
||||
<ThreeDots
|
||||
visible={true}
|
||||
height="50"
|
||||
width="50"
|
||||
color="#003778"
|
||||
radius="9"
|
||||
ariaLabel="three-dots-loading"
|
||||
wrapperStyle={{}}
|
||||
wrapperClass=""
|
||||
/>
|
||||
</div>
|
||||
) : ( */}
|
||||
<div className="flex justify-center items-center gap-2 text-center ">
|
||||
<Image
|
||||
alt="icon"
|
||||
// src={srcForImage as string}
|
||||
src={img1}
|
||||
className="h-10 rounded-md shadow-md"
|
||||
width={150}
|
||||
height={20}
|
||||
quality={100}
|
||||
/>
|
||||
<RefreshCcw
|
||||
className="cursor-pointer "
|
||||
// onClick={() => refetch()}
|
||||
color="#fcc52d"
|
||||
{/* Capcha */}
|
||||
<div className="flex items-start justify-center h-20 mt-8">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="captcha"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-2">
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="عبارت امنیتی"
|
||||
{...field}
|
||||
className="bg-white rounded-tr-3xl rounded-br-3xl focus:bg-white hover:bg-white text-center w-full h-10 m-0"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage className="bg-red text-white text-sm p-1 mb-4" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
{isLoading ? (
|
||||
<div className="flex justify-center text-center w-36">
|
||||
<ThreeDots
|
||||
visible={true}
|
||||
height="50"
|
||||
width="50"
|
||||
color="#003778"
|
||||
radius="9"
|
||||
ariaLabel="three-dots-loading"
|
||||
wrapperStyle={{}}
|
||||
wrapperClass=""
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center items-center gap-2 text-center ">
|
||||
<Image
|
||||
alt="icon"
|
||||
src={srcForImage as string}
|
||||
// src={img1}
|
||||
className="h-10 rounded-md shadow-md"
|
||||
width={150}
|
||||
height={20}
|
||||
quality={100}
|
||||
/>
|
||||
<RefreshCcw
|
||||
className="cursor-pointer "
|
||||
onClick={() => refetch()}
|
||||
color="#fcc52d"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{/* )} */}
|
||||
</div>
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
className="w-full p-2 text-black transition bg-yellow hover:bg-yellow rounded-3xl"
|
||||
>
|
||||
ورود
|
||||
</Button>
|
||||
</form>
|
||||
</Form>
|
||||
<Button
|
||||
type="submit"
|
||||
className="w-full p-2 text-black transition bg-yellow hover:bg-yellow rounded-3xl"
|
||||
>
|
||||
ورود
|
||||
</Button>
|
||||
</form>
|
||||
</Form>
|
||||
|
||||
<Link href={"#"} className="mt-6 underline text-[16px]">ورود با یزد من </Link>
|
||||
<Link href={"#"} className="mt-6 underline text-[16px]">
|
||||
ورود با یزد من{" "}
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
import React from "react";
|
||||
import Image from "next/image";
|
||||
import img1 from "@/assets/images/auth_image_1.png";
|
||||
import img2 from "@/assets/images/auth_image_6.png";
|
||||
import img3 from "@/assets/images/auth_image_4.png";
|
||||
import pishgaman from "@/assets/images/goroh-pishgaman-logo.png";
|
||||
import shetab from "@/assets/images/shetab-logo.png";
|
||||
import ostandari from "@/assets/images/ostandari2.png";
|
||||
import LoginForm from "./LoginForm";
|
||||
import { YellowSection } from "./YellowSection";
|
||||
|
||||
function SignIn() {
|
||||
return (
|
||||
|
|
@ -18,61 +12,7 @@ function SignIn() {
|
|||
</div>
|
||||
|
||||
{/* Left Section */}
|
||||
<div className="w-[30%] flex flex-col relative pt-10 z-0 h-screen items-center">
|
||||
<div className="flex flex-1 flex-col items-center justify-start w-full">
|
||||
<Image
|
||||
src={img1}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img1"
|
||||
className="w-[90%] h-auto mb-5"
|
||||
/>
|
||||
<Image
|
||||
src={img2}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img2"
|
||||
className="w-[90%] h-auto mb-5"
|
||||
/>
|
||||
<div className="flex flex-wrap flex-row w-full items-center justify-center">
|
||||
<Image
|
||||
src={ostandari}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img3"
|
||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||
/>
|
||||
<Image
|
||||
src={shetab}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img4"
|
||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||
/>
|
||||
<Image
|
||||
src={pishgaman}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img5"
|
||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Image
|
||||
src={img3}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img6"
|
||||
className="w-full m-0 max-h-[200px]"
|
||||
/>
|
||||
</div>
|
||||
<YellowSection />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
import Image from 'next/image'
|
||||
import React from 'react'
|
||||
import img1 from "@/assets/images/auth_image_1.png";
|
||||
import img2 from "@/assets/images/auth_image_6.png";
|
||||
import img3 from "@/assets/images/auth_image_4.png";
|
||||
import pishgaman from "@/assets/images/goroh-pishgaman-logo.png";
|
||||
import shetab from "@/assets/images/shetab-logo.png";
|
||||
import ostandari from "@/assets/images/ostandari2.png";
|
||||
|
||||
|
||||
|
||||
export const YellowSection = () => {
|
||||
return (
|
||||
<div className="w-[30%] flex flex-col relative pt-10 z-0 h-screen items-center">
|
||||
<div className="flex flex-1 flex-col items-center justify-start w-full">
|
||||
<Image
|
||||
src={img1}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img1"
|
||||
className="w-[90%] h-auto mb-5"
|
||||
/>
|
||||
<Image
|
||||
src={img2}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img2"
|
||||
className="w-[90%] h-auto mb-5"
|
||||
/>
|
||||
<div className="flex flex-wrap flex-row w-full items-center justify-center">
|
||||
<Image
|
||||
src={ostandari}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img3"
|
||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||
/>
|
||||
<Image
|
||||
src={shetab}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img4"
|
||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||
/>
|
||||
<Image
|
||||
src={pishgaman}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img5"
|
||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Image
|
||||
src={img3}
|
||||
width={500}
|
||||
height={500}
|
||||
quality={100}
|
||||
alt="img6"
|
||||
className="w-full m-0 max-h-[200px]"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
import React from 'react'
|
||||
import { YellowSection } from '../SignIn/YellowSection'
|
||||
|
||||
const Verify = () => {
|
||||
return (
|
||||
<section className="bg-yellow flex h-screen w-full items-stretch justify-center overflow-y-hidden">
|
||||
|
||||
{/* Right Section */}
|
||||
<div className="flex flex-1 items-center justify-center flex-col bg-white rounded-tl-[50px]">
|
||||
{/* <LoginForm /> */}
|
||||
OTP Section
|
||||
</div>
|
||||
|
||||
{/* Left Section */}
|
||||
<YellowSection />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
export default Verify
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export const VerifyInput = () => {
|
||||
return (
|
||||
<div>VerifyInput</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -11,17 +11,25 @@
|
|||
"@hookform/resolvers": "^3.3.4",
|
||||
"@radix-ui/react-label": "^2.0.2",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-toast": "^1.1.5",
|
||||
"@tanstack/react-query": "^5.29.0",
|
||||
"@tanstack/react-query-devtools": "^5.29.0",
|
||||
"axios": "^1.6.8",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.0",
|
||||
"cookies-next": "^4.1.1",
|
||||
"lucide-react": "^0.365.0",
|
||||
"next": "14.1.4",
|
||||
"next-themes": "^0.3.0",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"react-hook-form": "^7.51.2",
|
||||
"react-loader-spinner": "^6.1.6",
|
||||
"sonner": "^1.4.41",
|
||||
"tailwind-merge": "^2.2.2",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"zod": "^3.22.4"
|
||||
"zod": "^3.22.4",
|
||||
"zustand": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
|
|
@ -455,6 +463,40 @@
|
|||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/primitive": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz",
|
||||
"integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-collection": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz",
|
||||
"integrity": "sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/react-compose-refs": "1.0.1",
|
||||
"@radix-ui/react-context": "1.0.1",
|
||||
"@radix-ui/react-primitive": "1.0.3",
|
||||
"@radix-ui/react-slot": "1.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-compose-refs": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
|
||||
|
|
@ -472,6 +514,50 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-context": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz",
|
||||
"integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-dismissable-layer": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",
|
||||
"integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/primitive": "1.0.1",
|
||||
"@radix-ui/react-compose-refs": "1.0.1",
|
||||
"@radix-ui/react-primitive": "1.0.3",
|
||||
"@radix-ui/react-use-callback-ref": "1.0.1",
|
||||
"@radix-ui/react-use-escape-keydown": "1.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-label": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.0.2.tgz",
|
||||
|
|
@ -495,6 +581,53 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-portal": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz",
|
||||
"integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/react-primitive": "1.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-presence": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz",
|
||||
"integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/react-compose-refs": "1.0.1",
|
||||
"@radix-ui/react-use-layout-effect": "1.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-primitive": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",
|
||||
|
|
@ -536,6 +669,133 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-toast": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.1.5.tgz",
|
||||
"integrity": "sha512-fRLn227WHIBRSzuRzGJ8W+5YALxofH23y0MlPLddaIpLpCDqdE0NZlS2NRQDRiptfxDeeCjgFIpexB1/zkxDlw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/primitive": "1.0.1",
|
||||
"@radix-ui/react-collection": "1.0.3",
|
||||
"@radix-ui/react-compose-refs": "1.0.1",
|
||||
"@radix-ui/react-context": "1.0.1",
|
||||
"@radix-ui/react-dismissable-layer": "1.0.5",
|
||||
"@radix-ui/react-portal": "1.0.4",
|
||||
"@radix-ui/react-presence": "1.0.1",
|
||||
"@radix-ui/react-primitive": "1.0.3",
|
||||
"@radix-ui/react-use-callback-ref": "1.0.1",
|
||||
"@radix-ui/react-use-controllable-state": "1.0.1",
|
||||
"@radix-ui/react-use-layout-effect": "1.0.1",
|
||||
"@radix-ui/react-visually-hidden": "1.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-use-callback-ref": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
|
||||
"integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-use-controllable-state": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz",
|
||||
"integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/react-use-callback-ref": "1.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-use-escape-keydown": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz",
|
||||
"integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/react-use-callback-ref": "1.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-use-layout-effect": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
|
||||
"integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/react-visually-hidden": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz",
|
||||
"integrity": "sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@radix-ui/react-primitive": "1.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rushstack/eslint-patch": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.1.tgz",
|
||||
|
|
@ -550,6 +810,60 @@
|
|||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/query-core": {
|
||||
"version": "5.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.29.0.tgz",
|
||||
"integrity": "sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww==",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/query-devtools": {
|
||||
"version": "5.28.10",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.28.10.tgz",
|
||||
"integrity": "sha512-5UN629fKa5/1K/2Pd26gaU7epxRrYiT1gy+V+pW5K6hnf1DeUKK3pANSb2eHKlecjIKIhTwyF7k9XdyE2gREvQ==",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/react-query": {
|
||||
"version": "5.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.29.0.tgz",
|
||||
"integrity": "sha512-yxlhHB73jaBla6h5B6zPaGmQjokkzAhMHN4veotkPNiQ3Ac/mCxgABRZPsJJrgCTvhpcncBZcDBFxaR2B37vug==",
|
||||
"dependencies": {
|
||||
"@tanstack/query-core": "5.29.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/react-query-devtools": {
|
||||
"version": "5.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.29.0.tgz",
|
||||
"integrity": "sha512-WLuaU6yM4KdvBimEP1Km5lM4/p1J40cMp5I5z0Mc6a8QbBUYLK8qJcGIKelfLfDp7KmEcr59tzbRTmdH/GWvzQ==",
|
||||
"dependencies": {
|
||||
"@tanstack/query-devtools": "5.28.10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@tanstack/react-query": "^5.29.0",
|
||||
"react": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/cookie": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
|
||||
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="
|
||||
},
|
||||
"node_modules/@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
|
|
@ -998,6 +1312,11 @@
|
|||
"integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.19",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
|
||||
|
|
@ -1059,6 +1378,16 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.6.8",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz",
|
||||
"integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/axobject-query": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
|
||||
|
|
@ -1309,6 +1638,17 @@
|
|||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
|
||||
|
|
@ -1323,6 +1663,29 @@
|
|||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/cookie": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
|
||||
"integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/cookies-next": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/cookies-next/-/cookies-next-4.1.1.tgz",
|
||||
"integrity": "sha512-20QaN0iQSz87Os0BhNg9M71eM++gylT3N5szTlhq2rK6QvXn1FYGPB4eAgU4qFTunbQKhD35zfQ95ZWgzUy3Cg==",
|
||||
"dependencies": {
|
||||
"@types/cookie": "^0.6.0",
|
||||
"@types/node": "^16.10.2",
|
||||
"cookie": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cookies-next/node_modules/@types/node": {
|
||||
"version": "16.18.95",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.95.tgz",
|
||||
"integrity": "sha512-z9w+CcR7ahc7UhsKe+PGB25nmPmCERQBAdLdFHhoZ6+FfgSr7gUvdQI0eLH2t7ue8u5wKsLdde6cHKPjhC8vGg=="
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
|
|
@ -1485,6 +1848,14 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dequal": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
||||
|
|
@ -2259,6 +2630,25 @@
|
|||
"integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/for-each": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
|
||||
|
|
@ -2283,6 +2673,19 @@
|
|||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
|
||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/fraction.js": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
||||
|
|
@ -3262,6 +3665,25 @@
|
|||
"node": ">=8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
|
|
@ -3375,6 +3797,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/next-themes": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz",
|
||||
"integrity": "sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==",
|
||||
"peerDependencies": {
|
||||
"react": "^16.8 || ^17 || ^18",
|
||||
"react-dom": "^16.8 || ^17 || ^18"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/postcss": {
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
|
|
@ -3882,6 +4313,11 @@
|
|||
"react-is": "^16.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||
|
|
@ -4302,6 +4738,15 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/sonner": {
|
||||
"version": "1.4.41",
|
||||
"resolved": "https://registry.npmjs.org/sonner/-/sonner-1.4.41.tgz",
|
||||
"integrity": "sha512-uG511ggnnsw6gcn/X+YKkWPo5ep9il9wYi3QJxHsYe7yTZ4+cOd1wuodOUmOpFuXL+/RE3R04LczdNCDygTDgQ==",
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
|
|
@ -4937,6 +5382,14 @@
|
|||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/use-sync-external-store": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
|
||||
"integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
|
|
@ -5164,6 +5617,33 @@
|
|||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
},
|
||||
"node_modules/zustand": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.2.tgz",
|
||||
"integrity": "sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==",
|
||||
"dependencies": {
|
||||
"use-sync-external-store": "1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.7.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": ">=16.8",
|
||||
"immer": ">=9.0.6",
|
||||
"react": ">=16.8"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"immer": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10
package.json
10
package.json
|
|
@ -12,17 +12,25 @@
|
|||
"@hookform/resolvers": "^3.3.4",
|
||||
"@radix-ui/react-label": "^2.0.2",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-toast": "^1.1.5",
|
||||
"@tanstack/react-query": "^5.29.0",
|
||||
"@tanstack/react-query-devtools": "^5.29.0",
|
||||
"axios": "^1.6.8",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.0",
|
||||
"cookies-next": "^4.1.1",
|
||||
"lucide-react": "^0.365.0",
|
||||
"next": "14.1.4",
|
||||
"next-themes": "^0.3.0",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"react-hook-form": "^7.51.2",
|
||||
"react-loader-spinner": "^6.1.6",
|
||||
"sonner": "^1.4.41",
|
||||
"tailwind-merge": "^2.2.2",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"zod": "^3.22.4"
|
||||
"zod": "^3.22.4",
|
||||
"zustand": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
type Store = {
|
||||
data: any;
|
||||
saveData: (data: any) => void;
|
||||
};
|
||||
|
||||
// const useData = create<Store>()(persist((set: any) => ({
|
||||
// data: "",
|
||||
// saveData: (payload) => set((state: any) => ({ data: payload })),{
|
||||
// name: 'auth',
|
||||
// skipHydration: true,
|
||||
// })
|
||||
// }));
|
||||
|
||||
const useData = create<Store>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
data: "",
|
||||
saveData: (payload) => {
|
||||
set({ data:payload });
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: 'auth',
|
||||
skipHydration: true,
|
||||
}
|
||||
)
|
||||
);
|
||||
export default useData;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
type Store = {
|
||||
token: any;
|
||||
saveToken: (data: any) => void;
|
||||
};
|
||||
|
||||
const useToken = create<Store>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
token: false,
|
||||
saveToken: (payload: any) => {
|
||||
set({ token: payload });
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: "auth",
|
||||
skipHydration: true,
|
||||
}
|
||||
)
|
||||
);
|
||||
export default useToken;
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
"use client"
|
||||
|
||||
import React from "react";
|
||||
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
function Provider({children}) {
|
||||
const [client] = React.useState(
|
||||
new QueryClient({ defaultOptions: { queries: { staleTime: 5000 } } })
|
||||
);
|
||||
return (
|
||||
<QueryClientProvider client={client}>
|
||||
{children}
|
||||
<ReactQueryDevtools initialIsOpen={false} />
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default Provider;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import { QueryClient } from "@tanstack/query-core";
|
||||
import { cache } from "react";
|
||||
|
||||
const getQueryClient = cache(() => new QueryClient());
|
||||
export default getQueryClient;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"use client";
|
||||
|
||||
import { Hydrate as RQHydrate, HydrateProps } from "@tanstack/react-query";
|
||||
|
||||
function Hydrate(HydrateProps) {
|
||||
return <RQHydrate {...HydrateProps} />;
|
||||
}
|
||||
|
||||
export default Hydrate;
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import axios from "axios";
|
||||
import {
|
||||
CookieValueTypes,
|
||||
deleteCookie,
|
||||
getCookie,
|
||||
setCookie,
|
||||
} from "cookies-next";
|
||||
const instance = { id: 1 };
|
||||
|
||||
axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
|
||||
|
||||
|
||||
export async function logisterCitizen(payload: {
|
||||
phoneNumber: string;
|
||||
captcha: {
|
||||
key: string;
|
||||
value: string;
|
||||
};
|
||||
}) {
|
||||
const data = await axios.post(`api/${instance.id}/Authenticate/LogisterCitizen`,payload);
|
||||
return data.data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function verifyCitizen(payload: {
|
||||
otpToken: string | null;
|
||||
verificationCode: string;
|
||||
}) {
|
||||
const data = await axios.post(`api/${instance.id}/Authenticate/VerifyCitizen`, payload);
|
||||
return data.data;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import axios from "axios";
|
||||
import { CookieValueTypes } from "cookies-next";
|
||||
const instance = { id: 1 };
|
||||
|
||||
axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
|
||||
// axios.defaults.baseURL = "https://shahrbinapi.shetabdahi.ir/";
|
||||
|
||||
|
||||
// Get Captcha
|
||||
export async function getCaptcha() {
|
||||
const data = await axios.get(`/api/${instance.id}/Authenticate/Captcha`, {
|
||||
responseType: "blob",
|
||||
});
|
||||
return data;
|
||||
}
|
||||
Loading…
Reference in New Issue