Skip to content

Commit

Permalink
fix(my-pages): health - sjukratryggingar - double click on certificat…
Browse files Browse the repository at this point in the history
…ion button (#16718)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
disaerna and kodiakhq[bot] authored Nov 5, 2024
1 parent c97eefd commit b3a585b
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,12 @@ export const HealthOverview = () => {

const [
getInsuranceConfirmationLazyQuery,
{
data: confirmationData,
loading: confirmationLoading,
error: confirmationError,
},
{ loading: confirmationLoading, error: confirmationError },
] = useGetInsuranceConfirmationLazyQuery()

const getInsuranceConfirmation = async () => {
await getInsuranceConfirmationLazyQuery()
const downloadData = confirmationData?.rightsPortalInsuranceConfirmation
const { data: fetchedData } = await getInsuranceConfirmationLazyQuery()
const downloadData = fetchedData?.rightsPortalInsuranceConfirmation

if (downloadData?.data && downloadData.fileName) {
downloadLink(downloadData.data, 'application/pdf', downloadData.fileName)
Expand Down

0 comments on commit b3a585b

Please sign in to comment.