diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx
new file mode 100644
index 0000000..7dd534a
--- /dev/null
+++ b/src/pages/profile/index.tsx
@@ -0,0 +1,13 @@
+import ProfileDetails from "./section/ProfileDetails";
+import ProductConfigList from "./section/ProductConfigList";
+
+const Profile = () => {
+ return (
+
+ );
+};
+
+export default Profile;
diff --git a/src/pages/profile/section/ProductConfigList.tsx b/src/pages/profile/section/ProductConfigList.tsx
new file mode 100644
index 0000000..46e23ed
--- /dev/null
+++ b/src/pages/profile/section/ProductConfigList.tsx
@@ -0,0 +1,33 @@
+import ConfigItem from "./components/ConfigItem";
+
+const ProductConfigList = () => {
+ return (
+
+
+ لیست کانفیگ ها
+
+
+
+
+
+
+
+ );
+};
+
+export default ProductConfigList;
diff --git a/src/pages/profile/section/ProfileDetails.tsx b/src/pages/profile/section/ProfileDetails.tsx
new file mode 100644
index 0000000..df7afad
--- /dev/null
+++ b/src/pages/profile/section/ProfileDetails.tsx
@@ -0,0 +1,60 @@
+import { MdEdit } from "react-icons/md";
+import Button from "../../../components/button";
+import ModalEditProfile from "./components/ModalEditProfile";
+import { useState } from "react";
+
+const ProfileDetails = () => {
+ return (
+
+ );
+};
+
+export default ProfileDetails;
+
+const EditProfile = () => {
+ const [isOpen, setIsOpen] = useState(false);
+ return (
+
+
+
+
+ );
+};
+
+const ProfileImage = () => {
+ return (
+
+ );
+};
+
+const ProductDetails = () => {
+ return (
+
+
+
+ کانفیگ های فعال :{" "}
+ 2
+
+
+ کانفیگ های غیر فعال :{" "}
+ 10
+
+
+
+ );
+};
diff --git a/src/pages/profile/section/components/ConfigItem.tsx b/src/pages/profile/section/components/ConfigItem.tsx
new file mode 100644
index 0000000..57e9a75
--- /dev/null
+++ b/src/pages/profile/section/components/ConfigItem.tsx
@@ -0,0 +1,34 @@
+import { IoCopy } from "react-icons/io5";
+import Button from "../../../../components/button";
+import { ConfigItemProps } from "../../../../types/props";
+
+const ConfigItem = ({ dateBuy, configName, isDisabled }: ConfigItemProps) => {
+ return (
+
+ {isDisabled && (
+
+
+ کانفیگ {configName} غیر فعال است
+
+
+ )}
+
+
تاریخ خرید : {dateBuy}
+
+ {configName}
+
+
+
+
+
+
+
+ );
+};
+export default ConfigItem;
diff --git a/src/pages/profile/section/components/ModalEditProfile.tsx b/src/pages/profile/section/components/ModalEditProfile.tsx
new file mode 100644
index 0000000..239d793
--- /dev/null
+++ b/src/pages/profile/section/components/ModalEditProfile.tsx
@@ -0,0 +1,26 @@
+import { Dispatch, SetStateAction } from "react";
+import MuiModal from "../../../../common/modal";
+import Input from "../../../../components/input";
+
+const ModalEditProfile = ({
+ isOpen,
+ setIsOpen,
+}: {
+ isOpen: boolean;
+ setIsOpen: Dispatch
>;
+}) => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default ModalEditProfile;
diff --git a/src/routes/PrivateRoute.tsx b/src/routes/PrivateRoute.tsx
index a49d0c7..ec6d86e 100644
--- a/src/routes/PrivateRoute.tsx
+++ b/src/routes/PrivateRoute.tsx
@@ -1,8 +1,8 @@
-import { Navigate } from "react-router-dom";
+import { Navigate, Outlet } from "react-router-dom";
import { isAuthenticated } from "../utils/auth";
const PrivateRoute = () => {
- return !isAuthenticated() && ;
+ return !isAuthenticated() ? : ;
};
export default PrivateRoute;
diff --git a/src/types/props.d.ts b/src/types/props.d.ts
index 9963ef4..245592f 100644
--- a/src/types/props.d.ts
+++ b/src/types/props.d.ts
@@ -50,7 +50,7 @@ export interface NavData {
}
// begin ListTutorial.tsx
-import { Component, InputHTMLAttributes, SetStateAction } from "react";
+import React, { Component, InputHTMLAttributes, SetStateAction } from "react";
export type TutorialList = { id: number; name: string }[];
@@ -92,10 +92,22 @@ export interface InputProps extends InputHTMLAttributes {
type: string;
name?: string;
placeholder?: string;
+ labelStyle?: string;
extra?: string;
}
export interface MuiModalProps {
isOpenModal: boolean;
- setIsOpenModal:SetStateAction
+ setIsOpenModal: SetStateAction;
+ title: string;
+ nameService?: string;
+ submitText: string;
+ submitOnClick?: () => void;
+ children: React.ReactNode;
+}
+
+export interface ConfigItemProps {
+ dateBuy: string;
+ configName: string;
+ isDisabled: boolean;
}