diff --git a/ui/src/components/account/account-menu.tsx b/ui/src/components/account/account-menu.tsx index 6e93c6d47..8dd0ac790 100644 --- a/ui/src/components/account/account-menu.tsx +++ b/ui/src/components/account/account-menu.tsx @@ -18,8 +18,8 @@ import { getPictureUrl } from '@/lib/helpers/picture' const AccountMenu = () => { const { data: user } = UserAPI.useGet(swrConfig()) - const { data: invitationCount } = - InvitationAPI.useGetIncomingCount(swrConfig()) + // prettier-ignore + const { data: invitationCount } = InvitationAPI.useGetIncomingCount(swrConfig()) return ( { isSingleSelection ? selection[0] : undefined, ) const workspaceIsReady = workspace && !workspaceError - const groupListIsEmpty = - groupList && !groupListError && groupList.totalElements === 0 - const groupListIsReady = - groupList && !groupListError && groupList.totalElements > 0 + // prettier-ignore + const groupListIsEmpty = groupList && !groupListError && groupList.totalElements === 0 + // prettier-ignore + const groupListIsReady = groupList && !groupListError && groupList.totalElements > 0 const handleGrantPermission = useCallback(async () => { if (!group || !permission) { diff --git a/ui/src/components/sharing/sharing-group-permissions.tsx b/ui/src/components/sharing/sharing-group-permissions.tsx index deeb78dce..daf623aa2 100644 --- a/ui/src/components/sharing/sharing-group-permissions.tsx +++ b/ui/src/components/sharing/sharing-group-permissions.tsx @@ -42,10 +42,10 @@ const SharingGroupPermissions = () => { isLoading: permissionsIsLoading, mutate: mutatePermissions, } = FileAPI.useGetGroupPermissions(selection[0], swrConfig()) - const permissionsIsEmpty = - permissions && !permissionsError && permissions.length === 0 - const permissionsIsReady = - permissions && !permissionsError && permissions.length > 0 + // prettier-ignore + const permissionsIsEmpty = permissions && !permissionsError && permissions.length === 0 + // prettier-ignore + const permissionsIsReady = permissions && !permissionsError && permissions.length > 0 const handleRevokePermission = useCallback( async (permission: GroupPermission) => { diff --git a/ui/src/components/sharing/sharing-user-form.tsx b/ui/src/components/sharing/sharing-user-form.tsx index 6bf80ce9b..351dd2b06 100644 --- a/ui/src/components/sharing/sharing-user-form.tsx +++ b/ui/src/components/sharing/sharing-user-form.tsx @@ -65,10 +65,10 @@ const SharingUserForm = () => { isSingleSelection ? selection[0] : undefined, ) const workspaceIsReady = workspace && !workspaceError - const userListIsEmpty = - userList && !userListError && userList.totalElements === 0 - const userListIsReady = - userList && !userListError && userList.totalElements > 0 + // prettier-ignore + const userListIsEmpty = userList && !userListError && userList.totalElements === 0 + // prettier-ignore + const userListIsReady = userList && !userListError && userList.totalElements > 0 const handleGrantPermission = useCallback(async () => { if (!user || !permission) { diff --git a/ui/src/components/sharing/sharing-user-permissions.tsx b/ui/src/components/sharing/sharing-user-permissions.tsx index bd60b639b..19a0e23d1 100644 --- a/ui/src/components/sharing/sharing-user-permissions.tsx +++ b/ui/src/components/sharing/sharing-user-permissions.tsx @@ -49,10 +49,10 @@ const SharingUserPermissions = () => { isLoading: permissionsIsLoading, mutate: mutatePermissions, } = FileAPI.useGetUserPermissions(selection[0], swrConfig()) - const permissionsIsEmpty = - permissions && !permissionsError && permissions.length === 0 - const permissionsIsReady = - permissions && !permissionsError && permissions.length > 0 + // prettier-ignore + const permissionsIsEmpty = permissions && !permissionsError && permissions.length === 0 + // prettier-ignore + const permissionsIsReady = permissions && !permissionsError && permissions.length > 0 const handleRevokePermission = useCallback( async (permission: UserPermission) => { diff --git a/ui/src/pages/console/console-panel-groups.tsx b/ui/src/pages/console/console-panel-groups.tsx index 721da021b..f8e1e897f 100644 --- a/ui/src/pages/console/console-panel-groups.tsx +++ b/ui/src/pages/console/console-panel-groups.tsx @@ -52,12 +52,12 @@ const ConsolePanelGroups = () => { storage: consoleGroupsPaginationStorage(), }) const [isConfirmationOpen, setIsConfirmationOpen] = useState(false) - const [isConfirmationDestructive, setIsConfirmationDestructive] = - useState(false) + // prettier-ignore + const [isConfirmationDestructive, setIsConfirmationDestructive] = useState(false) const [confirmationHeader, setConfirmationHeader] = useState() const [confirmationBody, setConfirmationBody] = useState() - const [confirmationRequest, setConfirmationRequest] = - useState() + // prettier-ignore + const [confirmationRequest, setConfirmationRequest] = useState() const { data: list, error: listError, diff --git a/ui/src/pages/console/console-panel-organization.tsx b/ui/src/pages/console/console-panel-organization.tsx index 33f385f50..974db08a2 100644 --- a/ui/src/pages/console/console-panel-organization.tsx +++ b/ui/src/pages/console/console-panel-organization.tsx @@ -86,18 +86,18 @@ const ConsolePanelOrganization = () => { swrConfig(), ) const orgIsReady = org && !orgError - const userListIsEmpty = - userList && !userListError && userList.totalElements === 0 - const userListIsReady = - userList && !userListError && userList.totalElements > 0 - const workspaceListIsEmpty = - workspaceList && !workspaceListError && workspaceList.totalElements === 0 - const workspaceListIsReady = - workspaceList && !workspaceListError && workspaceList.totalElements > 0 - const groupListIsEmpty = - groupList && !groupListError && groupList.totalElements === 0 - const groupListIsReady = - groupList && !groupListError && groupList.totalElements > 0 + // prettier-ignore + const userListIsEmpty = userList && !userListError && userList.totalElements === 0 + // prettier-ignore + const userListIsReady = userList && !userListError && userList.totalElements > 0 + // prettier-ignore + const workspaceListIsEmpty = workspaceList && !workspaceListError && workspaceList.totalElements === 0 + // prettier-ignore + const workspaceListIsReady = workspaceList && !workspaceListError && workspaceList.totalElements > 0 + // prettier-ignore + const groupListIsEmpty = groupList && !groupListError && groupList.totalElements === 0 + // prettier-ignore + const groupListIsReady = groupList && !groupListError && groupList.totalElements > 0 return ( <> diff --git a/ui/src/pages/console/console-panel-organizations.tsx b/ui/src/pages/console/console-panel-organizations.tsx index e083f4240..acaa2cff6 100644 --- a/ui/src/pages/console/console-panel-organizations.tsx +++ b/ui/src/pages/console/console-panel-organizations.tsx @@ -51,12 +51,12 @@ const ConsolePanelOrganizations = () => { storage: consoleOrganizationsPaginationStorage(), }) const [isConfirmationOpen, setIsConfirmationOpen] = useState(false) - const [isConfirmationDestructive, setIsConfirmationDestructive] = - useState(false) + // prettier-ignore + const [isConfirmationDestructive, setIsConfirmationDestructive] = useState(false) const [confirmationHeader, setConfirmationHeader] = useState() const [confirmationBody, setConfirmationBody] = useState() - const [confirmationRequest, setConfirmationRequest] = - useState() + // prettier-ignore + const [confirmationRequest, setConfirmationRequest] = useState() const { data: list, error: listError, diff --git a/ui/src/pages/console/console-panel-overview.tsx b/ui/src/pages/console/console-panel-overview.tsx index 75cd22ef5..65d5685d8 100644 --- a/ui/src/pages/console/console-panel-overview.tsx +++ b/ui/src/pages/console/console-panel-overview.tsx @@ -49,8 +49,8 @@ const internalComponents = [ { id: 'console' }, { id: 'conversion' }, ] -const compareFn = (a: ComponentVersion, b: ComponentVersion) => - a.name > b.name ? 1 : 0 +// prettier-ignore +const compareFn = (a: ComponentVersion, b: ComponentVersion) => a.name > b.name ? 1 : 0 const ConsolePanelOverview = () => { const [userCount, setUserCount] = useState() diff --git a/ui/src/pages/console/console-panel-user.tsx b/ui/src/pages/console/console-panel-user.tsx index b3e8c9d47..e4c5bcb72 100644 --- a/ui/src/pages/console/console-panel-user.tsx +++ b/ui/src/pages/console/console-panel-user.tsx @@ -85,16 +85,16 @@ const ConsolePanelUser = () => { swrConfig(), ) const userIsReady = user && !userError - const groupListIsEmpty = - groupList && !groupListError && groupList.totalElements === 0 - const groupListIsReady = - groupList && !groupListError && groupList.totalElements > 0 + // prettier-ignore + const groupListIsEmpty = groupList && !groupListError && groupList.totalElements === 0 + // prettier-ignore + const groupListIsReady = groupList && !groupListError && groupList.totalElements > 0 const orgListIsEmpty = orgList && !orgListError && orgList.totalElements === 0 const orgListIsReady = orgList && !orgListError && orgList.totalElements > 0 - const workspaceListIsEmpty = - workspaceList && !workspaceListError && workspaceList.totalElements === 0 - const workspaceListIsReady = - workspaceList && !workspaceListError && workspaceList.totalElements > 0 + // prettier-ignore + const workspaceListIsEmpty = workspaceList && !workspaceListError && workspaceList.totalElements === 0 + // prettier-ignore + const workspaceListIsReady = workspaceList && !workspaceListError && workspaceList.totalElements > 0 return ( <> diff --git a/ui/src/pages/console/console-panel-users.tsx b/ui/src/pages/console/console-panel-users.tsx index 503193a81..65d5709ca 100644 --- a/ui/src/pages/console/console-panel-users.tsx +++ b/ui/src/pages/console/console-panel-users.tsx @@ -46,16 +46,15 @@ import userToString from '@/lib/helpers/user-to-string' const ConsolePanelUsers = () => { const [searchParams] = useSearchParams() - const query = decodeQuery(searchParams.get('q') as string) const navigate = useNavigate() const location = useLocation() const [isConfirmationOpen, setIsConfirmationOpen] = useState(false) - const [isConfirmationDestructive, setIsConfirmationDestructive] = - useState(false) + // prettier-ignore + const [isConfirmationDestructive, setIsConfirmationDestructive] = useState(false) const [confirmationHeader, setConfirmationHeader] = useState() const [confirmationBody, setConfirmationBody] = useState() - const [confirmationRequest, setConfirmationRequest] = - useState() + // prettier-ignore + const [confirmationRequest, setConfirmationRequest] = useState() const { page, size, steps, setPage, setSize } = usePagePagination({ navigateFn: navigate, searchFn: () => location.search, @@ -66,7 +65,10 @@ const ConsolePanelUsers = () => { error: listError, isLoading: listIsLoading, mutate, - } = UserAPI.useList({ query, page, size }, swrConfig()) + } = UserAPI.useList( + { query: decodeQuery(searchParams.get('q') as string), page, size }, + swrConfig(), + ) const { hasPagination } = usePageMonitor({ totalPages: list?.totalPages ?? 1, totalElements: list?.totalElements ?? 0, diff --git a/ui/src/pages/console/console-panel-workspaces.tsx b/ui/src/pages/console/console-panel-workspaces.tsx index 7e127ea83..ec262a33d 100644 --- a/ui/src/pages/console/console-panel-workspaces.tsx +++ b/ui/src/pages/console/console-panel-workspaces.tsx @@ -53,12 +53,12 @@ const ConsolePanelWorkspaces = () => { storage: consoleWorkspacesPaginationStorage(), }) const [isConfirmationOpen, setIsConfirmationOpen] = useState(false) - const [isConfirmationDestructive, setIsConfirmationDestructive] = - useState(false) + // prettier-ignore + const [isConfirmationDestructive, setIsConfirmationDestructive] = useState(false) const [confirmationHeader, setConfirmationHeader] = useState() const [confirmationBody, setConfirmationBody] = useState() - const [confirmationRequest, setConfirmationRequest] = - useState() + // prettier-ignore + const [confirmationRequest, setConfirmationRequest] = useState() const { data: list, error: listError, diff --git a/ui/src/pages/group/group-members-page.tsx b/ui/src/pages/group/group-members-page.tsx index 751d81b16..2c9de3af6 100644 --- a/ui/src/pages/group/group-members-page.tsx +++ b/ui/src/pages/group/group-members-page.tsx @@ -79,8 +79,8 @@ const GroupMembersPage = () => { ) const [userToRemove, setUserToRemove] = useState() const [isAddMembersModalOpen, setIsAddMembersModalOpen] = useState(false) - const [isRemoveMemberModalOpen, setIsRemoveMemberModalOpen] = - useState(false) + // prettier-ignore + const [isRemoveMemberModalOpen, setIsRemoveMemberModalOpen] = useState(false) const { hasPagination } = usePageMonitor({ totalPages: list?.totalPages ?? 1, totalElements: list?.totalElements ?? 0, diff --git a/ui/src/pages/organization/organization-invitations-page.tsx b/ui/src/pages/organization/organization-invitations-page.tsx index 21bc112fd..0d8293911 100644 --- a/ui/src/pages/organization/organization-invitations-page.tsx +++ b/ui/src/pages/organization/organization-invitations-page.tsx @@ -66,8 +66,8 @@ const OrganizationInvitationsPage = () => { }, swrConfig(), ) - const [isInviteMembersModalOpen, setIsInviteMembersModalOpen] = - useState(false) + // prettier-ignore + const [isInviteMembersModalOpen, setIsInviteMembersModalOpen] = useState(false) const orgIsReady = org && !orgError const listIsEmpty = list && !listError && list.totalElements === 0 const listIsReady = list && !listError && list.totalElements > 0 diff --git a/ui/src/pages/organization/organization-members-page.tsx b/ui/src/pages/organization/organization-members-page.tsx index 5e6f298d4..763f8f019 100644 --- a/ui/src/pages/organization/organization-members-page.tsx +++ b/ui/src/pages/organization/organization-members-page.tsx @@ -82,8 +82,8 @@ const OrganizationMembersPage = () => { (state) => state.ui.organizations.isInviteModalOpen, ) const [userToRemove, setUserToRemove] = useState() - const [isRemoveMemberModalOpen, setIsRemoveMemberModalOpen] = - useState(false) + // prettier-ignore + const [isRemoveMemberModalOpen, setIsRemoveMemberModalOpen] = useState(false) const { hasPagination } = usePageMonitor({ totalPages: list?.totalPages ?? 1, totalElements: list?.totalElements ?? 0, diff --git a/ui/src/pages/organization/organization-settings-page.tsx b/ui/src/pages/organization/organization-settings-page.tsx index 914a4a82f..50e067fe1 100644 --- a/ui/src/pages/organization/organization-settings-page.tsx +++ b/ui/src/pages/organization/organization-settings-page.tsx @@ -37,8 +37,8 @@ const OrganizationSettingsPage = () => { isLoading: orgIsLoading, } = OrganizationAPI.useGet(id, swrConfig()) const [isNameModalOpen, setIsNameModalOpen] = useState(false) - const [isInviteMembersModalOpen, setIsInviteMembersModalOpen] = - useState(false) + // prettier-ignore + const [isInviteMembersModalOpen, setIsInviteMembersModalOpen] = useState(false) const [isLeaveModalOpen, setIsLeaveModalOpen] = useState(false) const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false) const orgIsReady = org && !orgError diff --git a/ui/src/pages/workspace/workspace-settings-page.tsx b/ui/src/pages/workspace/workspace-settings-page.tsx index 92b4a425c..afc83c0f4 100644 --- a/ui/src/pages/workspace/workspace-settings-page.tsx +++ b/ui/src/pages/workspace/workspace-settings-page.tsx @@ -56,8 +56,8 @@ const WorkspaceSettingsPage = () => { [workspace], ) const [isNameModalOpen, setIsNameModalOpen] = useState(false) - const [isStorageCapacityModalOpen, setIsStorageCapacityModalOpen] = - useState(false) + // prettier-ignore + const [isStorageCapacityModalOpen, setIsStorageCapacityModalOpen] = useState(false) const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false) const workspaceIsReady = workspace && !workspaceError const storageUsageIsReady = storageUsage && !storageUsageError