@@ -58,7 +58,6 @@ import { download } from '#/utilities/download'
58
58
import { getMessageOrToString } from '#/utilities/error'
59
59
import { tryCreateOwnerPermission } from '#/utilities/permissions'
60
60
import { usePreventNavigation } from '#/utilities/preventNavigation'
61
- import { EMPTY_ARRAY } from 'enso-common/src/utilities/data/array'
62
61
import { toRfc3339 } from 'enso-common/src/utilities/data/dateTime'
63
62
64
63
// The number of bytes in 1 megabyte.
@@ -298,8 +297,8 @@ export interface UserGroupInfoWithUsers extends UserGroupInfo {
298
297
export function useListUserGroupsWithUsers (
299
298
backend : Backend ,
300
299
) : readonly UserGroupInfoWithUsers [ ] | null {
301
- const listUserGroupsQuery = useBackendQuery ( backend , 'listUserGroups' , EMPTY_ARRAY )
302
- const listUsersQuery = useBackendQuery ( backend , 'listUsers' , EMPTY_ARRAY )
300
+ const listUserGroupsQuery = useBackendQuery ( backend , 'listUserGroups' , [ ] )
301
+ const listUsersQuery = useBackendQuery ( backend , 'listUsers' , [ ] )
303
302
if ( listUserGroupsQuery . data == null || listUsersQuery . data == null ) {
304
303
return null
305
304
} else {
@@ -554,8 +553,8 @@ export function useNewFolder(backend: Backend, category: Category) {
554
553
const setNewestFolderId = useSetNewestFolderId ( )
555
554
const setSelectedAssets = useSetSelectedAssets ( )
556
555
const { user } = useFullUserSession ( )
557
- const { data : users } = useBackendQuery ( backend , 'listUsers' , EMPTY_ARRAY )
558
- const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , EMPTY_ARRAY )
556
+ const { data : users } = useBackendQuery ( backend , 'listUsers' , [ ] )
557
+ const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , [ ] )
559
558
const createDirectoryMutation = useMutation ( backendMutationOptions ( backend , 'createDirectory' ) )
560
559
561
560
return useEventCallback ( async ( parentId : DirectoryId , parentPath : string | null | undefined ) => {
@@ -598,8 +597,8 @@ export function useNewProject(backend: Backend, category: Category) {
598
597
const toggleDirectoryExpansion = useToggleDirectoryExpansion ( )
599
598
600
599
const { user } = useFullUserSession ( )
601
- const { data : users } = useBackendQuery ( backend , 'listUsers' , EMPTY_ARRAY )
602
- const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , EMPTY_ARRAY )
600
+ const { data : users } = useBackendQuery ( backend , 'listUsers' , [ ] )
601
+ const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , [ ] )
603
602
const createProjectMutation = useMutation ( backendMutationOptions ( backend , 'createProject' ) )
604
603
605
604
return useEventCallback (
@@ -677,8 +676,8 @@ export function useNewProject(backend: Backend, category: Category) {
677
676
export function useNewSecret ( backend : Backend , category : Category ) {
678
677
const toggleDirectoryExpansion = useToggleDirectoryExpansion ( )
679
678
const { user } = useFullUserSession ( )
680
- const { data : users } = useBackendQuery ( backend , 'listUsers' , EMPTY_ARRAY )
681
- const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , EMPTY_ARRAY )
679
+ const { data : users } = useBackendQuery ( backend , 'listUsers' , [ ] )
680
+ const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , [ ] )
682
681
const createSecretMutation = useMutation ( backendMutationOptions ( backend , 'createSecret' ) )
683
682
684
683
return useEventCallback (
@@ -716,8 +715,8 @@ export function useNewSecret(backend: Backend, category: Category) {
716
715
export function useNewDatalink ( backend : Backend , category : Category ) {
717
716
const toggleDirectoryExpansion = useToggleDirectoryExpansion ( )
718
717
const { user } = useFullUserSession ( )
719
- const { data : users } = useBackendQuery ( backend , 'listUsers' , EMPTY_ARRAY )
720
- const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , EMPTY_ARRAY )
718
+ const { data : users } = useBackendQuery ( backend , 'listUsers' , [ ] )
719
+ const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , [ ] )
721
720
const createDatalinkMutation = useMutation ( backendMutationOptions ( backend , 'createDatalink' ) )
722
721
723
722
return useEventCallback (
@@ -759,8 +758,8 @@ export function useUploadFiles(backend: Backend, category: Category) {
759
758
const toggleDirectoryExpansion = useToggleDirectoryExpansion ( )
760
759
const { setModal } = useSetModal ( )
761
760
const { user } = useFullUserSession ( )
762
- const { data : users } = useBackendQuery ( backend , 'listUsers' , EMPTY_ARRAY )
763
- const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , EMPTY_ARRAY )
761
+ const { data : users } = useBackendQuery ( backend , 'listUsers' , [ ] )
762
+ const { data : userGroups } = useBackendQuery ( backend , 'listUserGroups' , [ ] )
764
763
const uploadFileMutation = useUploadFileWithToastMutation ( backend )
765
764
const setSelectedAssets = useSetSelectedAssets ( )
766
765
0 commit comments