.
This commit was merged in pull request #123.
This commit is contained in:
@@ -4,7 +4,7 @@ import React, {
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
forwardRef
|
||||
forwardRef,
|
||||
} from "react";
|
||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||
import profile from "../../assets/images/profile-info-profile.png";
|
||||
@@ -83,8 +83,8 @@ export default function FamilyManageTabs({
|
||||
const accountRef = useRef();
|
||||
// to handle printing
|
||||
const useHandlePrint = useReactToPrint({
|
||||
content: () => accountRef.current,
|
||||
});
|
||||
content: () => accountRef.current,
|
||||
});
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -146,13 +146,11 @@ export default function FamilyManageTabs({
|
||||
/>
|
||||
)}
|
||||
{name === "Account" && (
|
||||
<>
|
||||
<Account
|
||||
familyDetails={familyDetails}
|
||||
myRef={accountRef}
|
||||
handlePrint={useHandlePrint}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
{name === "Profile" && <Profile />}
|
||||
</>
|
||||
@@ -263,20 +261,23 @@ const Account = forwardRef(({ familyDetails, myRef, handlePrint }) => {
|
||||
<QRCode
|
||||
size={256}
|
||||
style={{ height: "auto", maxWidth: "100%", width: "100%" }}
|
||||
value={`${familyDetails?.username}`}
|
||||
value={`https://www.google.com`}
|
||||
viewBox={`0 0 256 256`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="h-[50px] w-full flex justify-center items-center">
|
||||
<button className="btn-shine w-[116px] h-[46px] text-white rounded-full text-base bg-pink flex justify-center items-center" onClick={handlePrint}>
|
||||
<button
|
||||
className="btn-shine w-[116px] h-[46px] text-white rounded-full text-base bg-pink flex justify-center items-center"
|
||||
onClick={handlePrint}
|
||||
>
|
||||
Print
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})
|
||||
});
|
||||
|
||||
function Profile() {
|
||||
return <>Profile</>;
|
||||
|
||||
Reference in New Issue
Block a user