Skip to content

Commit f7c566f

Browse files
committed
squash!: Attend PR comments
1 parent 35d53ab commit f7c566f

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/authz/data/hooks.test.tsx renamed to src/authz/data/apiHooks.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { act, ReactNode } from 'react';
22
import { renderHook, waitFor } from '@testing-library/react';
33
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
44
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
5-
import { useValidateUserPermissions } from './hooks';
5+
import { useValidateUserPermissions } from './apiHooks';
66

77
jest.mock('@edx/frontend-platform/auth', () => ({
88
getAuthenticatedHttpClient: jest.fn(),
File renamed without changes.

src/library-authoring/common/context/LibraryContext.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
useState,
88
} from 'react';
99
import { useParams } from 'react-router-dom';
10-
import { useValidateUserPermissions } from '@src/authz/data/hooks';
10+
import { useValidateUserPermissions } from '@src/authz/data/apiHooks';
1111
import { CONTENT_LIBRARY_PERMISSIONS } from '@src/authz/constants';
1212
import { ContainerType } from '../../../generic/key-utils';
1313

@@ -118,7 +118,6 @@ export const LibraryProvider = ({
118118

119119
const { isLoading: isLoadingUserPermissions, data: userPermissions } = useValidateUserPermissions(permissions);
120120
const canPublish = userPermissions ? userPermissions[0]?.allowed : false;
121-
// TODO change to use canEdit from userPermissions later
122121
const readOnly = !!componentPickerMode || !libraryData?.canEditLibrary;
123122

124123
// Parse the initial collectionId and/or container ID(s) from the current URL params

0 commit comments

Comments
 (0)