+
-
- {/* {details.pollType === 0 && (
-
handleChange(values, "selectedChoices")}
- selecteds={values.selectedChoices}
- />
- )}
- {details.pollType === 1 && (
+
+ {details?.pollType === 0 &&
+ details?.choices.map((item: any) => (
+
setSatisfaction([Number(value)])}
+ className="flex flex-row mt-4 w-[48%] "
+ dir="rtl"
+ >
+
+
+
+
+
+ //
handleChange(values, "selectedChoices")}
+ // selecteds={values.selectedChoices}
+ // />
+ ))}
+
+ {/* {details.pollType === 1 && (
= ({ id }) => {
{!details?.answer && (
)}
{details?.answer && (
-
- شما قبلا در این نظرسنجی شرکت کرده اید.
-
+ شما قبلا در این نظرسنجی شرکت کرده اید.
)}
);
diff --git a/components/Settings/CardSetting.tsx b/components/Settings/CardSetting.tsx
new file mode 100644
index 0000000..f6070ca
--- /dev/null
+++ b/components/Settings/CardSetting.tsx
@@ -0,0 +1,30 @@
+"use client";
+import React from "react";
+import { settingItems } from "@/constants";
+import { FaAngleLeft } from "react-icons/fa";
+import Link from "next/link";
+const CardSetting = ({ title = "", icon = "", onClick = (f: any) => f }) => {
+ return (
+ <>
+ {settingItems.map((menuItem) => (
+
+
+ {/*
*/}
+ {menuItem.icon}
+
{menuItem.title}
+
+
+ {/*
*/}
+
+
+ ))}
+ >
+ );
+};
+
+export default CardSetting;
diff --git a/components/Settings/Settings.tsx b/components/Settings/Settings.tsx
new file mode 100644
index 0000000..cf368f3
--- /dev/null
+++ b/components/Settings/Settings.tsx
@@ -0,0 +1,14 @@
+import React from "react";
+import CardSetting from "./CardSetting";
+import SocialMedia from "./SocialMedia";
+
+function Settings() {
+ return (
+
+
+
+
+ );
+}
+
+export default Settings;
diff --git a/components/Settings/SocialMedia.tsx b/components/Settings/SocialMedia.tsx
new file mode 100644
index 0000000..bbfcfc7
--- /dev/null
+++ b/components/Settings/SocialMedia.tsx
@@ -0,0 +1,46 @@
+import Link from "next/link";
+import React from "react";
+import { SlSocialInstagram } from "react-icons/sl";
+import { FaWhatsapp } from "react-icons/fa";
+import { RiTelegramLine } from "react-icons/ri";
+import { TfiWorld } from "react-icons/tfi";
+
+const SocialMedia = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default SocialMedia;
diff --git a/constants/index.tsx b/constants/index.tsx
index 13f94df..c68569b 100644
--- a/constants/index.tsx
+++ b/constants/index.tsx
@@ -4,6 +4,12 @@ import { PiSquaresFourFill } from "react-icons/pi";
import { FaChartBar } from "react-icons/fa";
import { TbWorld } from "react-icons/tb";
import { FaCogs } from "react-icons/fa";
+// ..
+import { FaUser } from "react-icons/fa";
+import { FaInfo } from "react-icons/fa";
+import { FaQuestionCircle } from "react-icons/fa";
+import { FaLock } from "react-icons/fa";
+import { LuLogOut } from "react-icons/lu";
export const menuItems = [
{ id: 1, title: "صفحه اصلی", href: "/User/RecentRequest", icon:
},
@@ -13,4 +19,13 @@ export const menuItems = [
{ id: 5, title: "اخبار", href: "/User/News" , icon:
},
{ id: 6, title: "تنظیمات", href: "/User/Settings", icon:
},
];
-
\ No newline at end of file
+
+
+ export const settingItems = [
+ { id: 1, title: "ویرایش نمایه", href: "/User/Profile", icon:
},
+ { id: 2, title: "درباره ما", href: "#", icon:
},
+ { id: 3, title: "سوالات متداول", href: "/User/FAQ", icon:
},
+ { id: 4, title: "حریم خصوصی", href: "/User/PnpUser", icon:
},
+ { id: 5, title: "خروج از حساب کاربری", href: "#" , icon:
},
+ ];
+
diff --git a/utils/CitizenPolls.ts b/utils/CitizenPolls.ts
index cf5c7aa..7138f29 100644
--- a/utils/CitizenPolls.ts
+++ b/utils/CitizenPolls.ts
@@ -23,7 +23,7 @@ export async function getSinglePoll(id: number) {
// Post CitizenPollsAnswer {id}
export async function postCitizenPollsAnswer(
id: number,
- payload: { text: string; choicesIds: [number] }
+ payload: { text: string; choicesIds:number[] }
) {
const data = await axios.post(
`/api/CitizenPolls/Polls/Answer/${id}`,