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