From fd8507c60bbd011ddb91e7a1e4bbcb2943bf55d7 Mon Sep 17 00:00:00 2001 From: Matin Dehghanian Date: Tue, 15 Oct 2024 19:34:56 +0330 Subject: [PATCH] improve styte --- .../ClientTab/ServiceComponents/InfoRow.jsx | 15 +- src/components/ServiceInfo.jsx | 178 ++++++------------ 2 files changed, 70 insertions(+), 123 deletions(-) diff --git a/src/components/ClientTab/ServiceComponents/InfoRow.jsx b/src/components/ClientTab/ServiceComponents/InfoRow.jsx index 76f2ee5..c9820ac 100644 --- a/src/components/ClientTab/ServiceComponents/InfoRow.jsx +++ b/src/components/ClientTab/ServiceComponents/InfoRow.jsx @@ -1,7 +1,15 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Col, Stack } from "react-bootstrap"; -const InfoRow = ({ icon, label, value, extraIcon, extraColor, extend }) => ( +const InfoRow = ({ + icon, + label, + value, + extraIcon, + extraColor, + extend, + rtl, +}) => (
@@ -9,10 +17,7 @@ const InfoRow = ({ icon, label, value, extraIcon, extraColor, extend }) => (
{label}
-
+
{value} {extraIcon && ( { const [serviceInfo, setServiceInfo] = useState({ @@ -36,7 +32,7 @@ const ServiceInfo = ({ data }) => { }); const statusMapping = { - on_hold: { color: "yellow", detail: "در انتظار اتصال" }, + on_hold: { color: "yellow", detail: "متوقف شده" }, expired: { color: "orange", detail: "منقضی شده" }, limited: { color: "brown", detail: "محدود شده" }, active: { color: "green", detail: "فعال" }, @@ -83,12 +79,6 @@ const ServiceInfo = ({ data }) => { }); } }, [data]); - const [show, setShow] = useState(false); - - const handleClose = () => setShow(false); - const handleShow = () => { - setShow(true); - }; const { formattedDate, @@ -101,114 +91,66 @@ const ServiceInfo = ({ data }) => { } = serviceInfo; return ( - <> - -
-
- -

{"اطلاعات سرویس"}

-
- { - e.stopPropagation(); - handleShow(); - }} - /> -
- - - - - - - - - - + +
+ +

{"اطلاعات سرویس"}

+
- - - } - /> - - - -
+ + + + + + + + + - - - لینک ساب - - - - - handleCopyToClipboard( - window.location.origin + data?.subscription_url - ) - } - /> - - - + + + } + /> + + + +
); };