Browse Source

[ui-core] move hooks to nested folder (#3969)

Ram Prasad Agarwal 10 months ago
parent
commit
07ab5d5f53
37 changed files with 44 additions and 43 deletions
  1. 1 1
      desktop/core/src/desktop/js/apps/editor/components/result/reactExample/ReactExample.tsx
  2. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
  3. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserPage.tsx
  4. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserTab/StorageBrowserTab.tsx
  5. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.test.tsx
  6. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.tsx
  7. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.test.tsx
  8. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.tsx
  9. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.test.tsx
  10. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.tsx
  11. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.test.tsx
  12. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.tsx
  13. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.test.tsx
  14. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.tsx
  15. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.test.tsx
  16. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.tsx
  17. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.test.tsx
  18. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.tsx
  19. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/SummaryModal/SummaryModal.tsx
  20. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageDirectoryPage.tsx
  21. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.test.tsx
  22. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.tsx
  23. 1 1
      desktop/core/src/desktop/js/reactComponents/FileChooser/FileChooserModal/FileChooserModal.tsx
  24. 2 1
      desktop/core/src/desktop/js/reactComponents/FileUploadQueue/FileUploadQueue.tsx
  25. 1 1
      desktop/core/src/desktop/js/reactComponents/GlobalAlert/GlobalAlert.tsx
  26. 1 1
      desktop/core/src/desktop/js/reactComponents/Pagination/Pagination.tsx
  27. 1 1
      desktop/core/src/desktop/js/reactComponents/WelcomeTour/WelcomeTour.tsx
  28. 3 3
      desktop/core/src/desktop/js/utils/hooks/useFileUpload/useChunkUpload.ts
  29. 2 2
      desktop/core/src/desktop/js/utils/hooks/useFileUpload/useRegularUpload.ts
  30. 2 2
      desktop/core/src/desktop/js/utils/hooks/useHuePubSub/useHuePubSub.test.tsx
  31. 1 1
      desktop/core/src/desktop/js/utils/hooks/useHuePubSub/useHuePubSub.ts
  32. 2 2
      desktop/core/src/desktop/js/utils/hooks/useLoadData/useLoadData.test.tsx
  33. 1 1
      desktop/core/src/desktop/js/utils/hooks/useLoadData/useLoadData.ts
  34. 0 0
      desktop/core/src/desktop/js/utils/hooks/useQueueProcessor/useQueueProcessor.test.tsx
  35. 0 0
      desktop/core/src/desktop/js/utils/hooks/useQueueProcessor/useQueueProcessor.ts
  36. 2 2
      desktop/core/src/desktop/js/utils/hooks/useSaveData/useSaveData.test.tsx
  37. 1 1
      desktop/core/src/desktop/js/utils/hooks/useSaveData/useSaveData.ts

+ 1 - 1
desktop/core/src/desktop/js/apps/editor/components/result/reactExample/ReactExample.tsx

@@ -14,7 +14,7 @@ import { Ace } from '../../../../../ext/ace';
 
 import { CURSOR_POSITION_CHANGED_EVENT } from '../../aceEditor/AceLocationHandler';
 import ReactExampleGlobal from '../../../../../reactComponents/ReactExampleGlobal/ReactExampleGlobal';
-import { useHuePubSub } from '../../../../../utils/hooks/useHuePubSub';
+import { useHuePubSub } from '../../../../../utils/hooks/useHuePubSub/useHuePubSub';
 import SqlExecutable from '../../../execution/sqlExecutable';
 
 import './ReactExample.scss';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx

@@ -25,7 +25,7 @@ import FileIcon from '@cloudera/cuix-core/icons/react/DocumentationIcon';
 
 import { i18nReact } from '../../../utils/i18nReact';
 import useDebounce from '../../../utils/useDebounce';
-import useLoadData from '../../../utils/hooks/useLoadData';
+import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 
 import { BrowserViewType, ListDirectory } from '../../../reactComponents/FileChooser/types';
 import { LIST_DIRECTORY_API_URL } from '../../../reactComponents/FileChooser/api';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserPage.tsx

@@ -25,7 +25,7 @@ import StorageBrowserTab from './StorageBrowserTab/StorageBrowserTab';
 import { ApiFileSystem, FILESYSTEMS_API_URL } from '../../reactComponents/FileChooser/api';
 
 import './StorageBrowserPage.scss';
-import useLoadData from '../../utils/hooks/useLoadData';
+import useLoadData from '../../utils/hooks/useLoadData/useLoadData';
 import LoadingErrorWrapper from '../../reactComponents/LoadingErrorWrapper/LoadingErrorWrapper';
 
 const StorageBrowserPage = (): JSX.Element => {

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserTab/StorageBrowserTab.tsx

@@ -23,7 +23,7 @@ import PathBrowser from '../../../reactComponents/PathBrowser/PathBrowser';
 import StorageDirectoryPage from '../StorageDirectoryPage/StorageDirectoryPage';
 import { FILE_STATS_API_URL } from '../../../reactComponents/FileChooser/api';
 import { BrowserViewType, FileStats } from '../../../reactComponents/FileChooser/types';
-import useLoadData from '../../../utils/hooks/useLoadData';
+import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 
 import './StorageBrowserTab.scss';
 import StorageFilePage from '../StorageFilePage/StorageFilePage';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.test.tsx

@@ -8,7 +8,7 @@ import {
 } from '../../../../reactComponents/FileChooser/api';
 
 const mockSave = jest.fn();
-jest.mock('../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.tsx

@@ -31,7 +31,7 @@ import {
   CREATE_FILE_API_URL
 } from '../../../../reactComponents/FileChooser/api';
 import { FileStats } from '../../../../reactComponents/FileChooser/types';
-import useSaveData from '../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../utils/hooks/useSaveData/useSaveData';
 import InputModal from '../../InputModal/InputModal';
 import './CreateAndUploadAction.scss';
 import DragAndDrop from '../../../../reactComponents/DragAndDrop/DragAndDrop';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.test.tsx

@@ -46,7 +46,7 @@ const mockFiles: StorageDirectoryTableData[] = [
 ];
 
 const mockSave = jest.fn();
-jest.mock('../../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.tsx

@@ -17,7 +17,7 @@
 import React, { useState } from 'react';
 import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
-import useSaveData from '../../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 import { COMPRESS_API_URL } from '../../../../../reactComponents/FileChooser/api';
 import { Input } from 'antd';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.test.tsx

@@ -34,7 +34,7 @@ const mockFiles: StorageDirectoryTableData[] = [
 ];
 
 const mockSave = jest.fn();
-jest.mock('../../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.tsx

@@ -17,7 +17,7 @@
 import React from 'react';
 import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
-import useSaveData from '../../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 import {
   BULK_DELETION_API_URL,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.test.tsx

@@ -34,7 +34,7 @@ const mockFile: StorageDirectoryTableData = {
 
 const mockSave = jest.fn();
 let mockLoading = false;
-jest.mock('../../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.tsx

@@ -17,7 +17,7 @@
 import React from 'react';
 import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
-import useSaveData from '../../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 import { EXTRACT_API_URL } from '../../../../../reactComponents/FileChooser/api';
 

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.test.tsx

@@ -60,7 +60,7 @@ const mockFiles: StorageDirectoryTableData[] = [
     replication: 1
   }
 ];
-jest.mock('../../../../../utils/hooks/useLoadData', () => ({
+jest.mock('../../../../../utils/hooks/useLoadData/useLoadData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     data: {
@@ -71,7 +71,7 @@ jest.mock('../../../../../utils/hooks/useLoadData', () => ({
 }));
 
 const mockSave = jest.fn();
-jest.mock('../../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.tsx

@@ -16,7 +16,7 @@
 
 import React from 'react';
 import { i18nReact } from '../../../../../utils/i18nReact';
-import useSaveData from '../../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { ActionType } from '../StorageBrowserActions.util';
 import {
   BULK_COPY_API_URL,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.test.tsx

@@ -21,7 +21,7 @@ import RenameModal from './RenameModal';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 
 const mockSave = jest.fn();
-jest.mock('../../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.tsx

@@ -17,7 +17,7 @@
 import React from 'react';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 import { i18nReact } from '../../../../../utils/i18nReact';
-import useSaveData from '../../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { RENAME_API_URL } from '../../../../../reactComponents/FileChooser/api';
 import InputModal from '../../../InputModal/InputModal';
 

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.test.tsx

@@ -21,7 +21,7 @@ import ReplicationModal from './ReplicationModal';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 
 const mockSave = jest.fn();
-jest.mock('../../../../../utils/hooks/useSaveData', () => ({
+jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({
   __esModule: true,
   default: jest.fn(() => ({
     save: mockSave,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.tsx

@@ -17,7 +17,7 @@
 import React from 'react';
 import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
 import { i18nReact } from '../../../../../utils/i18nReact';
-import useSaveData from '../../../../../utils/hooks/useSaveData';
+import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { SET_REPLICATION_API_URL } from '../../../../../reactComponents/FileChooser/api';
 import InputModal from '../../../InputModal/InputModal';
 

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/SummaryModal/SummaryModal.tsx

@@ -21,7 +21,7 @@ import { Spin } from 'antd';
 import huePubSub from '../../../../../utils/huePubSub';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import formatBytes from '../../../../../utils/formatBytes';
-import useLoadData from '../../../../../utils/hooks/useLoadData';
+import useLoadData from '../../../../../utils/hooks/useLoadData/useLoadData';
 import { CONTENT_SUMMARY_API_URL } from '../../../../../reactComponents/FileChooser/api';
 import {
   ContentSummary,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageDirectoryPage.tsx

@@ -42,7 +42,7 @@ import formatBytes from '../../../utils/formatBytes';
 
 import './StorageDirectoryPage.scss';
 import { formatTimestamp } from '../../../utils/dateTimeUtils';
-import useLoadData from '../../../utils/hooks/useLoadData';
+import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 import {
   DEFAULT_PAGE_SIZE,
   DEFAULT_POLLING_TIME,

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.test.tsx

@@ -42,7 +42,7 @@ const mockData = jest.fn().mockReturnValue({
   compression: 'none'
 });
 
-jest.mock('../../../utils/hooks/useLoadData', () => {
+jest.mock('../../../utils/hooks/useLoadData/useLoadData', () => {
   return jest.fn(() => ({
     data: mockData(),
     loading: false

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.tsx

@@ -30,7 +30,7 @@ import {
   SAVE_FILE_API_URL
 } from '../../../reactComponents/FileChooser/api';
 import huePubSub from '../../../utils/huePubSub';
-import useSaveData from '../../../utils/hooks/useSaveData';
+import useSaveData from '../../../utils/hooks/useSaveData/useSaveData';
 import Pagination from '../../../reactComponents/Pagination/Pagination';
 import {
   DEFAULT_PREVIEW_PAGE_SIZE,
@@ -38,7 +38,7 @@ import {
   SUPPORTED_FILE_EXTENSIONS,
   SupportedFileTypes
 } from '../../../utils/constants/storageBrowser';
-import useLoadData from '../../../utils/hooks/useLoadData';
+import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 import { getLastKnownConfig } from '../../../config/hueConfig';
 import LoadingErrorWrapper from '../../../reactComponents/LoadingErrorWrapper/LoadingErrorWrapper';
 

+ 1 - 1
desktop/core/src/desktop/js/reactComponents/FileChooser/FileChooserModal/FileChooserModal.tsx

@@ -26,7 +26,7 @@ import { ApiFileSystem, FILESYSTEMS_API_URL } from '../api';
 import { FileSystem } from '../types';
 import './FileChooserModal.scss';
 import PathBrowser from '../../PathBrowser/PathBrowser';
-import useLoadData from '../../../utils/hooks/useLoadData';
+import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 
 interface FileProps {
   show: boolean;

+ 2 - 1
desktop/core/src/desktop/js/reactComponents/FileUploadQueue/FileUploadQueue.tsx

@@ -53,7 +53,8 @@ const sortOrder = [
 const FileUploadQueue: React.FC<FileUploadQueueProps> = ({ filesQueue, onClose, onComplete }) => {
   const config = getLastKnownConfig();
   const isChunkUpload =
-    config?.storage_browser.enable_chunked_file_upload ?? DEFAULT_ENABLE_CHUNK_UPLOAD;
+    (config?.storage_browser.enable_chunked_file_upload ?? DEFAULT_ENABLE_CHUNK_UPLOAD) &&
+    !!config?.hue_config.enable_task_server;
 
   const { t } = i18nReact.useTranslation();
   const [isExpanded, setIsExpanded] = useState(true);

+ 1 - 1
desktop/core/src/desktop/js/reactComponents/GlobalAlert/GlobalAlert.tsx

@@ -26,7 +26,7 @@ import {
   HIDE_GLOBAL_ALERTS_TOPIC
 } from './events';
 import { HueAlert } from './types';
-import { useHuePubSub } from '../../utils/hooks/useHuePubSub';
+import { useHuePubSub } from '../../utils/hooks/useHuePubSub/useHuePubSub';
 import { i18nReact } from 'utils/i18nReact';
 
 type alertType = AlertProps['type'];

+ 1 - 1
desktop/core/src/desktop/js/reactComponents/Pagination/Pagination.tsx

@@ -58,7 +58,7 @@ const Pagination = ({
       label: (
         <BorderlessButton
           onClick={() => {
-            setPageSize && setPageSize(option);
+            setPageSize?.(option);
             setPageNumber(1);
           }}
           className="hue-pagination__page-size-menu-item-btn"

+ 1 - 1
desktop/core/src/desktop/js/reactComponents/WelcomeTour/WelcomeTour.tsx

@@ -19,7 +19,7 @@ import Joyride from 'react-joyride';
 
 import { hueWindow } from 'types/types';
 import I18n from 'utils/i18n';
-import { useHuePubSub } from '../../utils/hooks/useHuePubSub';
+import { useHuePubSub } from '../../utils/hooks/useHuePubSub/useHuePubSub';
 
 import './WelcomeTour.scss';
 import scssVariables from './WelcomeTour.module.scss';

+ 3 - 3
desktop/core/src/desktop/js/utils/hooks/useFileUpload/useChunkUpload.ts

@@ -16,14 +16,14 @@
 
 import { useEffect, useState } from 'react';
 import { getLastKnownConfig } from '../../../config/hueConfig';
-import useSaveData from '../useSaveData';
-import useQueueProcessor from '../useQueueProcessor';
+import useSaveData from '../useSaveData/useSaveData';
+import useQueueProcessor from '../useQueueProcessor/useQueueProcessor';
 import {
   DEFAULT_CHUNK_SIZE,
   DEFAULT_CONCURRENT_MAX_CONNECTIONS,
   FileUploadStatus
 } from '../../constants/storageBrowser';
-import useLoadData from '../useLoadData';
+import useLoadData from '../useLoadData/useLoadData';
 import { TaskServerResponse, TaskStatus } from '../../../reactComponents/TaskBrowser/TaskBrowser';
 import {
   createChunks,

+ 2 - 2
desktop/core/src/desktop/js/utils/hooks/useFileUpload/useRegularUpload.ts

@@ -14,13 +14,13 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import useQueueProcessor from '../useQueueProcessor';
+import useQueueProcessor from '../useQueueProcessor/useQueueProcessor';
 import { UPLOAD_FILE_URL } from '../../../reactComponents/FileChooser/api';
 import {
   DEFAULT_CONCURRENT_MAX_CONNECTIONS,
   FileUploadStatus
 } from '../../constants/storageBrowser';
-import useSaveData from '../useSaveData';
+import useSaveData from '../useSaveData/useSaveData';
 import { UploadItem } from './util';
 
 interface UseUploadQueueResponse {

+ 2 - 2
desktop/core/src/desktop/js/utils/hooks/useHuePubSub.test.tsx → desktop/core/src/desktop/js/utils/hooks/useHuePubSub/useHuePubSub.test.tsx

@@ -1,7 +1,7 @@
 import { renderHook, act } from '@testing-library/react';
 import { useHuePubSub } from './useHuePubSub';
-import huePubSub from '../huePubSub';
-import noop from '../timing/noop';
+import huePubSub from '../../huePubSub';
+import noop from '../../timing/noop';
 
 describe('useHuePubSub', () => {
   const originalSubscribe = huePubSub.subscribe;

+ 1 - 1
desktop/core/src/desktop/js/utils/hooks/useHuePubSub.ts → desktop/core/src/desktop/js/utils/hooks/useHuePubSub/useHuePubSub.ts

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import { useState, useEffect } from 'react';
-import huePubSub from '../huePubSub';
+import huePubSub from '../../huePubSub';
 
 // Basic helper hook to let a component subscribe to a huePubSub topic and rerender for each message
 // by placing the message/info in a state that is automatically updated.

+ 2 - 2
desktop/core/src/desktop/js/utils/hooks/useLoadData.test.tsx → desktop/core/src/desktop/js/utils/hooks/useLoadData/useLoadData.test.tsx

@@ -16,10 +16,10 @@
 
 import { renderHook, act, waitFor } from '@testing-library/react';
 import useLoadData from './useLoadData';
-import { get } from '../../api/utils';
+import { get } from '../../../api/utils';
 
 // Mock the `get` function
-jest.mock('../../api/utils', () => ({
+jest.mock('../../../api/utils', () => ({
   get: jest.fn()
 }));
 

+ 1 - 1
desktop/core/src/desktop/js/utils/hooks/useLoadData.ts → desktop/core/src/desktop/js/utils/hooks/useLoadData/useLoadData.ts

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import { useCallback, useEffect, useMemo, useState } from 'react';
-import { ApiFetchOptions, get } from '../../api/utils';
+import { ApiFetchOptions, get } from '../../../api/utils';
 import { AxiosError } from 'axios';
 
 export interface Options<T, U> {

+ 0 - 0
desktop/core/src/desktop/js/utils/hooks/useQueueProcessor.test.tsx → desktop/core/src/desktop/js/utils/hooks/useQueueProcessor/useQueueProcessor.test.tsx


+ 0 - 0
desktop/core/src/desktop/js/utils/hooks/useQueueProcessor.ts → desktop/core/src/desktop/js/utils/hooks/useQueueProcessor/useQueueProcessor.ts


+ 2 - 2
desktop/core/src/desktop/js/utils/hooks/useSaveData.test.tsx → desktop/core/src/desktop/js/utils/hooks/useSaveData/useSaveData.test.tsx

@@ -15,9 +15,9 @@
 // limitations under the License.
 import { renderHook, act, waitFor } from '@testing-library/react';
 import useSaveData from './useSaveData';
-import { post } from '../../api/utils';
+import { post } from '../../../api/utils';
 
-jest.mock('../../api/utils', () => ({
+jest.mock('../../../api/utils', () => ({
   post: jest.fn()
 }));
 

+ 1 - 1
desktop/core/src/desktop/js/utils/hooks/useSaveData.ts → desktop/core/src/desktop/js/utils/hooks/useSaveData/useSaveData.ts

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import { useCallback, useEffect, useMemo, useState } from 'react';
-import { ApiFetchOptions, post } from '../../api/utils';
+import { ApiFetchOptions, post } from '../../../api/utils';
 
 interface saveOptions<T> {
   url?: string;