diff --git a/src/web/src/pages/admin/links/[[...query]]/index.tsx b/src/web/src/pages/admin/links/[[...query]]/index.tsx index b3d7e7f58..0d0bba873 100644 --- a/src/web/src/pages/admin/links/[[...query]]/index.tsx +++ b/src/web/src/pages/admin/links/[[...query]]/index.tsx @@ -26,7 +26,7 @@ import { type LinkSearchResult, } from "~/api/models/actionLinks"; import { - createLinkSharing, + getLinkById, searchLinks, updateLinkStatus, } from "~/api/services/actionLinks"; @@ -324,21 +324,14 @@ const Links: NextPageWithLayout<{ // fetch the QR code queryClient .fetchQuery({ - queryKey: ["OpportunitySharingLinkQR", item.entityId], - queryFn: () => - createLinkSharing({ - name: null, - description: null, - entityType: item.entityType, - entityId: item.entityId, - includeQRCode: true, - }), + queryKey: ["OpportunityLink", item.id], + queryFn: () => getLinkById(item.id, true), }) .then(() => { // get the QR code from the cache const qrCode = queryClient.getQueryData([ - "OpportunitySharingLinkQR", - item.entityId, + "OpportunityLink", + item.id, ]); // show the QR code @@ -562,6 +555,7 @@ const Links: NextPageWithLayout<{ src={qrCodeImageData} alt="QR Code" width={200} + height={200} className="h-auto" /> diff --git a/src/web/src/pages/organisations/[id]/links/[[...query]]/index.tsx b/src/web/src/pages/organisations/[id]/links/[[...query]]/index.tsx index 8760eb570..802c433db 100644 --- a/src/web/src/pages/organisations/[id]/links/[[...query]]/index.tsx +++ b/src/web/src/pages/organisations/[id]/links/[[...query]]/index.tsx @@ -331,14 +331,14 @@ const Links: NextPageWithLayout<{ // fetch the QR code queryClient .fetchQuery({ - queryKey: ["OpportunitySharingLinkQR", item.entityId], + queryKey: ["OpportunityLink", item.id], queryFn: () => getLinkById(item.id, true), }) .then(() => { // get the QR code from the cache const qrCode = queryClient.getQueryData([ - "OpportunitySharingLinkQR", - item.entityId, + "OpportunityLink", + item.id, ]); // show the QR code @@ -517,6 +517,7 @@ const Links: NextPageWithLayout<{ src={qrCodeImageData} alt="QR Code" width={200} + height={200} className="h-auto" />