Compare commits
No commits in common. "08872f04b9b250c76449cd8a8235d9aabe39e15e" and "24350884fd7dfb77b0ba7946c07f66e18ba19ae6" have entirely different histories.
08872f04b9
...
24350884fd
|
|
@ -5,7 +5,7 @@ export default function page({ params }: { params: any }) {
|
|||
const id = params.id;
|
||||
|
||||
return (
|
||||
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] mt-10 sm:mt-8 pt-9 mx-auto mb-6">
|
||||
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] mt-10 sm:mt-8 pt-9 mx-auto mb-10">
|
||||
<ComplainsDetails role="Inspector" id={id} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -214,18 +214,10 @@ export default function AdminCategories() {
|
|||
description: data.description,
|
||||
});
|
||||
}
|
||||
|
||||
const resetFormAdd = () => {
|
||||
formAdd.reset({
|
||||
titleCategory: "",
|
||||
description: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-[85vh] flex justify-center">
|
||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||
<div className="flex flex-row items-center justify-between w-full ">
|
||||
<div className="flex flex-row justify-between w-full ">
|
||||
{/* 1 */}
|
||||
<div className="w-full my-4 text-lg font-bold text-right text-neutral-600">
|
||||
لیست دسته بندی ها
|
||||
|
|
@ -250,7 +242,7 @@ const resetFormAdd = () => {
|
|||
<p className="text-[#464646] text-base font-bold">
|
||||
افزودن دسته بندی
|
||||
</p>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0">
|
||||
<IoMdClose />
|
||||
</AlertDialogCancel>
|
||||
</AlertDialogTitle>
|
||||
|
|
@ -315,7 +307,7 @@ const resetFormAdd = () => {
|
|||
>
|
||||
افزودن
|
||||
</Button>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl">
|
||||
بستن
|
||||
</AlertDialogCancel>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ const FormSchemaAddKey = z.object({
|
|||
}),
|
||||
});
|
||||
|
||||
|
||||
export default function AdminKeysManagement() {
|
||||
const router = useRouter();
|
||||
const [keyId, setKeyId] = useState("");
|
||||
|
|
@ -254,15 +253,6 @@ export default function AdminKeysManagement() {
|
|||
saveTextFile();
|
||||
}
|
||||
}, [AddKeyMutation.isSuccess]);
|
||||
|
||||
|
||||
const resetFormAdd = () => {
|
||||
formAdd.reset({
|
||||
title: "",
|
||||
publicKey: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-[85vh] flex justify-center">
|
||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||
|
|
@ -274,7 +264,7 @@ export default function AdminKeysManagement() {
|
|||
<p className="text-[#464646] text-base font-bold">
|
||||
افزودن کلید جدید
|
||||
</p>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0">
|
||||
<IoMdClose />
|
||||
</AlertDialogCancel>
|
||||
</AlertDialogTitle>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
"use client";
|
||||
|
||||
import React, { useState, useRef, useEffect } from "react";
|
||||
import {
|
||||
useMutation,
|
||||
useQuery,
|
||||
RefetchOptions,
|
||||
useQueryClient,
|
||||
} from "@tanstack/react-query";
|
||||
import { useMutation, useQuery, RefetchOptions } from "@tanstack/react-query";
|
||||
import {
|
||||
GetAllNews,
|
||||
GetSingleNews,
|
||||
SubmitNews,
|
||||
UpdateNews,
|
||||
DeleteNews,
|
||||
GetAllOrganizations,
|
||||
GetSingleOrganization,
|
||||
SubmitOrganization,
|
||||
UpdateOrganization,
|
||||
DeleteOrganization,
|
||||
} from "@/utils/adminApi";
|
||||
import { FaRegEdit } from "react-icons/fa";
|
||||
import { IoMdClose } from "react-icons/io";
|
||||
|
|
@ -132,7 +132,7 @@ export default function AdminNews() {
|
|||
const [openEdit, setOpenEdit] = React.useState(false);
|
||||
|
||||
const [delOrg, setDelOrg] = React.useState(false);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
// List News
|
||||
const {
|
||||
data: data1,
|
||||
|
|
@ -145,18 +145,10 @@ export default function AdminNews() {
|
|||
GetAllNews({
|
||||
PageNumber: page,
|
||||
}),
|
||||
// queryFn: () => GetAllOrganizations(),
|
||||
// refetchOnWindowFocus: false,
|
||||
});
|
||||
|
||||
const {
|
||||
data: data2,
|
||||
error: Error2,
|
||||
isLoading: isLoading2,
|
||||
refetch: refetch2,
|
||||
} = useQuery({
|
||||
queryKey: ["News", keyId],
|
||||
queryFn: () => GetSingleNews(keyId),
|
||||
enabled: false,
|
||||
});
|
||||
console.log(data1);
|
||||
|
||||
// Edit
|
||||
const handleClickEdit = (
|
||||
|
|
@ -168,30 +160,23 @@ export default function AdminNews() {
|
|||
image: string
|
||||
) => {
|
||||
// Set state variables
|
||||
console.log(id);
|
||||
setKeyId(id);
|
||||
setTitleNews(title);
|
||||
setDescNews(description);
|
||||
setUrlNews(url);
|
||||
setContentNews(content);
|
||||
setImageNews(image);
|
||||
|
||||
// Reset the form with new default values
|
||||
formEdit.reset({
|
||||
titleNews: title,
|
||||
description: description,
|
||||
urlNews: url,
|
||||
content: content,
|
||||
// uploadImg:image
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
if (keyId) {
|
||||
refetch2();
|
||||
}
|
||||
}, [keyId]);
|
||||
useEffect(() => {
|
||||
if (data2) {
|
||||
formEdit.reset({
|
||||
titleNews: data2.title,
|
||||
description: data2.description,
|
||||
urlNews: data2.url,
|
||||
content: data2.content,
|
||||
});
|
||||
}
|
||||
}, [data2]);
|
||||
|
||||
// Form Edit
|
||||
type EditNewsFormValues = z.infer<typeof EditNewsFormSchema>;
|
||||
// This can come from your database or API.
|
||||
|
|
@ -340,18 +325,10 @@ export default function AdminNews() {
|
|||
}
|
||||
}, [data1]);
|
||||
|
||||
const resetFormAdd = () => {
|
||||
formAdd.reset({
|
||||
titleNews: "",
|
||||
urlNews: "",
|
||||
content: "",
|
||||
description: "",
|
||||
});
|
||||
};
|
||||
return (
|
||||
<div className="w-full min-h-[85vh] flex justify-center pb-4">
|
||||
<div className="w-full min-h-[85vh] flex justify-center py-4">
|
||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||
<div className="flex flex-row items-center justify-between w-full ">
|
||||
<div className="flex flex-row justify-between w-full ">
|
||||
{/* 1 */}
|
||||
<div className="w-full my-4 text-lg font-bold text-right text-neutral-600">
|
||||
لیست خبر ها
|
||||
|
|
@ -376,12 +353,7 @@ export default function AdminNews() {
|
|||
<p className="text-[#464646] text-base font-bold">
|
||||
افزودن خبر
|
||||
</p>
|
||||
<AlertDialogCancel
|
||||
className="h-auto p-0 border-0"
|
||||
onClick={() => {
|
||||
resetFormAdd();
|
||||
}}
|
||||
>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0">
|
||||
<IoMdClose />
|
||||
</AlertDialogCancel>
|
||||
</AlertDialogTitle>
|
||||
|
|
@ -534,12 +506,7 @@ export default function AdminNews() {
|
|||
>
|
||||
افزودن
|
||||
</Button>
|
||||
<AlertDialogCancel
|
||||
className="mt-0 text-white bg-blue rounded-xl"
|
||||
onClick={() => {
|
||||
resetFormAdd();
|
||||
}}
|
||||
>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl">
|
||||
بستن
|
||||
</AlertDialogCancel>
|
||||
</div>
|
||||
|
|
@ -751,10 +718,16 @@ export default function AdminNews() {
|
|||
</p>
|
||||
<p className="text-sm font-normal leading-normal text-slate-500">
|
||||
توضیحات:
|
||||
<span className="self-end text-slate-800 line-clamp-4">
|
||||
<span className="self-end text-slate-800 line-clamp-2">
|
||||
{item.description}
|
||||
</span>
|
||||
</p>
|
||||
<p className="text-sm font-normal leading-normal text-slate-500">
|
||||
محتوا:
|
||||
<span className="self-end text-slate-800">
|
||||
{item.content}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-end justify-end w-full gap-2">
|
||||
<Switch
|
||||
|
|
|
|||
|
|
@ -217,17 +217,10 @@ export default function AdminOrganizations() {
|
|||
description: data.description,
|
||||
});
|
||||
}
|
||||
|
||||
const resetFormAdd = () => {
|
||||
formAdd.reset({
|
||||
titleOrg: "",
|
||||
description: "",
|
||||
});
|
||||
};
|
||||
return (
|
||||
<div className="w-full min-h-[85vh] flex justify-center">
|
||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||
<div className="flex flex-row items-center justify-between w-full ">
|
||||
<div className="flex flex-row justify-between w-full ">
|
||||
{/* 1 */}
|
||||
<div className="w-full my-4 text-lg font-bold text-right text-neutral-600">
|
||||
لیست سازمان ها
|
||||
|
|
@ -252,7 +245,7 @@ export default function AdminOrganizations() {
|
|||
<p className="text-[#464646] text-base font-bold">
|
||||
افزودن سازمان
|
||||
</p>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0">
|
||||
<IoMdClose />
|
||||
</AlertDialogCancel>
|
||||
</AlertDialogTitle>
|
||||
|
|
@ -317,7 +310,7 @@ export default function AdminOrganizations() {
|
|||
>
|
||||
افزودن
|
||||
</Button>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl">
|
||||
بستن
|
||||
</AlertDialogCancel>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -250,21 +250,12 @@ const AddSliderMutation = useMutation({
|
|||
setOpenAdd(false);
|
||||
|
||||
refetch1();
|
||||
resetField("Title");
|
||||
resetField("Image");
|
||||
resetField("Url");
|
||||
resetField("Description");
|
||||
|
||||
toast("عملیات شما با موفقیت انجام شد. ", {
|
||||
className: "!bg-green-500 !text-white",
|
||||
});
|
||||
},
|
||||
onError: (err: any | string) => {
|
||||
resetField("Title");
|
||||
resetField("Image");
|
||||
resetField("Url");
|
||||
resetField("Description");
|
||||
|
||||
toast(<>{err.response.data.detail}</>, {
|
||||
className: "!bg-red-500 !text-white",
|
||||
});
|
||||
|
|
@ -306,25 +297,14 @@ function onSubmitAdd(data: AddSliderFormValues) {
|
|||
}
|
||||
|
||||
AddSliderMutation.mutate(formData);
|
||||
resetField("Title");
|
||||
resetField("Image");
|
||||
resetField("Url");
|
||||
resetField("Description");
|
||||
|
||||
}
|
||||
|
||||
const resetFormAdd = () => {
|
||||
formAdd.reset({
|
||||
titleSlider: "",
|
||||
uploadImg: null,
|
||||
urlSlider: "",
|
||||
description: "",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-[85vh] flex justify-center">
|
||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||
<div className="flex flex-row items-center justify-between w-full ">
|
||||
<div className="flex flex-row justify-between w-full ">
|
||||
{/* 1 */}
|
||||
<div className="w-full my-4 text-lg font-bold text-right text-neutral-600">
|
||||
لیست اسلایدرها
|
||||
|
|
@ -349,7 +329,7 @@ const resetFormAdd = () => {
|
|||
<p className="text-[#464646] text-base font-bold">
|
||||
افزودن اسلایدر
|
||||
</p>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="h-auto p-0 border-0">
|
||||
<IoMdClose />
|
||||
</AlertDialogCancel>
|
||||
</AlertDialogTitle>
|
||||
|
|
@ -485,7 +465,7 @@ const resetFormAdd = () => {
|
|||
>
|
||||
افزودن
|
||||
</Button>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl" onClick={() => { resetFormAdd(); }}>
|
||||
<AlertDialogCancel className="mt-0 text-white bg-blue rounded-xl">
|
||||
بستن
|
||||
</AlertDialogCancel>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { ClipboardList, EyeOff, Info, User, UserCheck } from "lucide-react";
|
||||
import React from "react";
|
||||
|
||||
export default function BoxDashboard({
|
||||
|
|
@ -8,32 +7,17 @@ export default function BoxDashboard({
|
|||
value: string;
|
||||
title: string;
|
||||
}) {
|
||||
const boxIcons = {
|
||||
"درخواست ناشناس": <EyeOff className=" mb-2 mx-auto" />,
|
||||
"درخواست شناس": <UserCheck className=" mb-2 mx-auto" />,
|
||||
درخواست: <ClipboardList className=" mb-2 mx-auto" />,
|
||||
کاربر: <User className=" mb-2 mx-auto" />,
|
||||
};
|
||||
const handelIcon = (item: keyof typeof boxIcons) => {
|
||||
const icon = boxIcons[item];
|
||||
return icon;
|
||||
};
|
||||
const checkIcon = boxIcons[title as keyof typeof boxIcons] ? (
|
||||
boxIcons[title as keyof typeof boxIcons]
|
||||
) : (
|
||||
<Info className=" mb-2 mx-auto" />
|
||||
);
|
||||
return (
|
||||
<div
|
||||
className=" px-7 py-8 bg-zinc-100 rounded-lg shadow flex flex-col justify-evenly items-center text-black
|
||||
className=" px-7 py-8 bg-zinc-100 rounded-lg shadow flex flex-col justify-end items-center text-black
|
||||
transition duration-200
|
||||
hover:text-white hover:bg-blue
|
||||
group h-44 w-44"
|
||||
>
|
||||
{checkIcon ? checkIcon : <Info className=" mb-2 mx-auto" />}
|
||||
{/* <EyeOff className=" mb-2 mx-auto" /> */}
|
||||
<div className="group-hover:-translate-y-2 flex flex-col justify-center transition-all duration-300">
|
||||
<p className="text-center text-sm font-medium">{value}</p>
|
||||
<div className="group-hover:-translate-y-2 transition-all duration-300">
|
||||
<p className="text-center text-xs font-medium">
|
||||
{value}
|
||||
</p>
|
||||
<p className="text-center text-xs font-medium">{title}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ export default function ComplainsDetails({
|
|||
const router = useRouter();
|
||||
let data;
|
||||
|
||||
|
||||
|
||||
const getComplaintMutation = useMutation({
|
||||
mutationKey: ["Complaint", id],
|
||||
mutationFn: getComplaint,
|
||||
|
|
@ -270,7 +272,7 @@ export default function ComplainsDetails({
|
|||
|
||||
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col">
|
||||
{/* 1 */}
|
||||
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[80vh]">
|
||||
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[78vh]">
|
||||
<div className=" max-lg:hidden bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col lg:h-full">
|
||||
<p className="text-[#464646] text-base font-bold mb-1">
|
||||
انجام عملیات
|
||||
|
|
@ -406,83 +408,76 @@ export default function ComplainsDetails({
|
|||
</>
|
||||
)}
|
||||
</div>
|
||||
<div className="h-[calc(80vh-12.8em)] max-h-[calc(80vh-12.8em)] overflow-hidden">
|
||||
<div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col h-full ">
|
||||
<p className="text-[#464646] text-base font-bold">
|
||||
روند شکایت
|
||||
</p>
|
||||
<div
|
||||
className="flex flex-col mt-4 gap-y-4 overflow-auto
|
||||
scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-100 "
|
||||
>
|
||||
{data.contents?.map((item: any) => {
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="p-4 bg-white rounded-lg shadow-md "
|
||||
>
|
||||
<div className="flex items-center gap-4 ">
|
||||
<p className="">
|
||||
<Badge>
|
||||
{item.sender == 0 ? "شهروند" : "بازرس"}
|
||||
</Badge>
|
||||
</p>
|
||||
<p className="">
|
||||
تاریخ :
|
||||
<span className="text-[#7C838A]">
|
||||
{convertDate(item.dateTime)}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className=" text-[#464646] mt-2">
|
||||
<div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col ">
|
||||
<p className="text-[#464646] text-base font-bold">روند شکایت</p>
|
||||
<div
|
||||
className="flex flex-col mt-4 gap-y-4 max-h-[50vh] lg:max-h-[39.5vh] 2xl:max-h-[43.5vh] 3xl:max-h-[41vh] min-[1920px]:max-h-[48.5vh] overflow-auto
|
||||
scrollbar-thin scrollbar-thumb-rounded-md scrollbar-thumb-gray-500 scrollbar-track-gray-100"
|
||||
>
|
||||
{data.contents?.map((item: any) => {
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="p-4 bg-white rounded-lg shadow-md "
|
||||
>
|
||||
<div className="flex items-center gap-4 ">
|
||||
<p className="">
|
||||
<Badge>
|
||||
{item.sender == 0 ? "شهروند" : "بازرس"}
|
||||
</Badge>
|
||||
</p>
|
||||
<p className="">
|
||||
تاریخ :
|
||||
<span className="text-[#7C838A]">
|
||||
{item.text ? item.text : "-"}
|
||||
{convertDate(item.dateTime)}
|
||||
</span>
|
||||
</div>
|
||||
{item.media.length !== 0 && (
|
||||
<Separator className="mt-2 mb-1 " />
|
||||
)}
|
||||
<div className=" text-[#464646] mt-2">
|
||||
<div className="flex flex-wrap items-center w-full gap-2 mt-2 text-xs max-md:flex-col">
|
||||
{item?.media.map((item: any, index: number) => {
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
||||
</p>
|
||||
</div>
|
||||
<div className=" text-[#464646] mt-2">
|
||||
<span className="text-[#7C838A]">
|
||||
{item.text ? item.text : "-"}
|
||||
</span>
|
||||
</div>
|
||||
{item.media.length !== 0 && (
|
||||
<Separator className="mt-2 mb-1 " />
|
||||
)}
|
||||
<div className=" text-[#464646] mt-2">
|
||||
<div className="flex flex-wrap items-center w-full gap-2 mt-2 text-xs max-md:flex-col">
|
||||
{item?.media.map((item: any, index: number) => {
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
||||
>
|
||||
<a
|
||||
onClick={() =>
|
||||
openFileInNewTab(item.data, item.mimeType)
|
||||
}
|
||||
className="flex items-center gap-2 truncate cursor-pointer "
|
||||
>
|
||||
<a
|
||||
onClick={() =>
|
||||
openFileInNewTab(
|
||||
item.data,
|
||||
item.mimeType
|
||||
)
|
||||
}
|
||||
className="flex items-center gap-2 truncate cursor-pointer "
|
||||
>
|
||||
<File className="w-6 h-6 " />
|
||||
<p className=" max-w-[5rem] truncate">
|
||||
{item.title}
|
||||
</p>
|
||||
</a>
|
||||
<ArrowDownToLine
|
||||
className="cursor-pointer "
|
||||
onClick={() =>
|
||||
downloadFile(
|
||||
item.data,
|
||||
item.title,
|
||||
item.mimeType
|
||||
)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<File className="w-6 h-6 " />
|
||||
<p className=" max-w-[5rem] truncate">
|
||||
{item.title}
|
||||
</p>
|
||||
</a>
|
||||
<ArrowDownToLine
|
||||
className="cursor-pointer "
|
||||
onClick={() =>
|
||||
downloadFile(
|
||||
item.data,
|
||||
item.title,
|
||||
item.mimeType
|
||||
)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ export default function ControllerDashboard() {
|
|||
queryFn: () => getInfo(),
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
const [decryptedMessage, errorMessage] = useDecrypt(
|
||||
"gJoT9AqK7wk1MZFSD04yXXfF36fzsOL+RYtJfySrEnQeJ7VoaL7pmOU6nB3+0+PQcaxIi3hf1AHjzIB0Cn5oHgKROeoI4XslhAezZk23QhtIU4HUF1wpeOJfA+4hWyRfbh4fI9774sa/KL47VaBbrNM/rvBxk6hjlKx5mTb3hqM="
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-12 pt-9 mx-auto px-2">
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.6",
|
||||
"version": "0.2.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sootzani",
|
||||
"version": "0.2.6",
|
||||
"version": "0.2.5",
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.3.2",
|
||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.6",
|
||||
"version": "0.2.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ export async function GetAllNews({
|
|||
return data;
|
||||
}
|
||||
|
||||
export async function GetSingleNews(id: string) {
|
||||
export async function GetSingleNews({ id }: { id: string }) {
|
||||
const data = await axios.get(`api/News/${id}`);
|
||||
return data.data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue