1
0

fix: resolve double slash issue in report print functionality (#1051)

* fix print button for report tab modules

* fix: resolve double slash in report print URLs - Revert ChromiumlyTenancy changes
This commit is contained in:
rmb
2026-03-26 18:52:26 +11:00
committed by GitHub
parent cfbfc0b746
commit ad0451f32d
+2 -1
View File
@@ -1,6 +1,7 @@
// @ts-nocheck // @ts-nocheck
import React from 'react'; import React from 'react';
import useApiRequest from './useRequest'; import useApiRequest from './useRequest';
import { normalizeApiPath } from '../utils';
export const useRequestPdf = (httpProps) => { export const useRequestPdf = (httpProps) => {
const apiRequest = useApiRequest(); const apiRequest = useApiRequest();
@@ -17,7 +18,7 @@ export const useRequestPdf = (httpProps) => {
headers: { accept: 'application/pdf' }, headers: { accept: 'application/pdf' },
responseType: 'blob', responseType: 'blob',
...httpProps, ...httpProps,
url: `/api/${httpProps?.url}`, url: `/api/${normalizeApiPath(httpProps?.url)}`,
}) })
.then((response) => { .then((response) => {
// Create a Blob from the PDF Stream. // Create a Blob from the PDF Stream.