From 609a3f4a367ffa7ca84e5348af6815125751ab8a Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 15 Mar 2026 15:37:56 +1100 Subject: [PATCH] [UI] Library fix (#11530) * Ensure "lib" is built as part of CI * Fix useMonitorBackgroundTask hook --- .github/workflows/qc_checks.yaml | 2 +- src/frontend/lib/hooks/MonitorBackgroundTask.tsx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 6b3a9cb590..4e1ac5cd29 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -759,7 +759,7 @@ jobs: - name: Install dependencies run: cd src/frontend && yarn install - name: Build frontend - run: cd src/frontend && yarn run compile && yarn run build + run: cd src/frontend && yarn run compile && yarn run lib && yarn run build - name: Write version file - SHA run: cd src/backend/InvenTree/web/static/web/.vite && echo "$GITHUB_SHA" > sha.txt - name: Zip frontend diff --git a/src/frontend/lib/hooks/MonitorBackgroundTask.tsx b/src/frontend/lib/hooks/MonitorBackgroundTask.tsx index 9f4c5f43ba..db130b6be4 100644 --- a/src/frontend/lib/hooks/MonitorBackgroundTask.tsx +++ b/src/frontend/lib/hooks/MonitorBackgroundTask.tsx @@ -1,5 +1,3 @@ -import { ApiEndpoints } from '@lib/enums/ApiEndpoints'; -import { apiUrl } from '@lib/functions/Api'; import { useDocumentVisibility } from '@mantine/hooks'; import { notifications, showNotification } from '@mantine/notifications'; import { @@ -10,7 +8,8 @@ import { import { type QueryClient, useQuery } from '@tanstack/react-query'; import type { AxiosInstance } from 'axios'; import { useEffect, useState } from 'react'; -import { queryClient } from '../../src/App'; +import { ApiEndpoints } from '../enums/ApiEndpoints'; +import { apiUrl } from '../functions/Api'; export type MonitorBackgroundTaskProps = { api: AxiosInstance; @@ -114,6 +113,6 @@ export default function useMonitorBackgroundTask( }); }) }, - queryClient + props.queryClient ); }