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} + + + + `; + + 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 - - + + + Scan the code from mobile app + + + + + + + Print + - - Print - );
Username: ${familyDetails?.username}
Password: ${familyDetails?.pin}
scan the code from mobile app
+ Scan the code from mobile app +