From 42c3676bcf034c2a45c1ff8308de4878916a327c Mon Sep 17 00:00:00 2001 From: Ebube Date: Tue, 30 May 2023 02:11:51 +0100 Subject: [PATCH] . --- src/components/FamilyAcc/FamilyManageTabs.jsx | 81 +++++++++++++++---- 1 file changed, 64 insertions(+), 17 deletions(-) diff --git a/src/components/FamilyAcc/FamilyManageTabs.jsx b/src/components/FamilyAcc/FamilyManageTabs.jsx index 355708c..fc32640 100644 --- a/src/components/FamilyAcc/FamilyManageTabs.jsx +++ b/src/components/FamilyAcc/FamilyManageTabs.jsx @@ -131,7 +131,12 @@ export default function FamilyManageTabs({ ) : ( <> - {name === "Tasks" && } + {name === "Tasks" && ( + + )} {name === "Account" && ( )} @@ -213,29 +218,71 @@ function ProfileInfo({ } function Account({ familyDetails }) { + const handlePrint = () => { + const printableContent = ` + + + + + +
+

Family member details

+

Username: ${familyDetails?.username}

+

Password: ${familyDetails?.pin}

+ QR Code + + + `; + + const printWindow = window.open('', '', 'width=800,height=700'); + printWindow.document.open(); + printWindow.document.write(printableContent); + printWindow.document.close(); + + printWindow.onload = () => { + printWindow.print(); + }; + }; + return (
-
-

- Username: {familyDetails?.username} -

-

- Pin: {familyDetails?.pin} -

-
+
+

+ Username:{" "} + + {familyDetails?.username} + +

+

+ Pin:{" "} + {familyDetails?.pin} +

+
- or + + or + -
-

scan the code from mobile app

-qr-sample -
+
+

+ Scan the code from mobile app +

+ qr-sample +
+
+
+
-
- -
);