diff --git a/app/portainer/react/components/account.ts b/app/portainer/react/components/account.ts index 3d77b91b6..ad96c99c0 100644 --- a/app/portainer/react/components/account.ts +++ b/app/portainer/react/components/account.ts @@ -26,7 +26,8 @@ export const accountModule = angular ) .component( 'accessTokensDatatable', - r2a(withUIRouter(withReactQuery(withCurrentUser(AccessTokensDatatable))), [ - 'canExit', - ]) + r2a( + withUIRouter(withReactQuery(withCurrentUser(AccessTokensDatatable))), + [] + ) ).name; diff --git a/app/react/portainer/account/AccountView/AccessTokensDatatable/AccessTokensDatatable.tsx b/app/react/portainer/account/AccountView/AccessTokensDatatable/AccessTokensDatatable.tsx index c5b64c5c7..015d185f6 100644 --- a/app/react/portainer/account/AccountView/AccessTokensDatatable/AccessTokensDatatable.tsx +++ b/app/react/portainer/account/AccountView/AccessTokensDatatable/AccessTokensDatatable.tsx @@ -12,7 +12,7 @@ import { TableActions } from './TableActions'; const tableKey = 'access-tokens'; const store = createPersistedStore(tableKey); -export function AccessTokensDatatable({ canExit }: { canExit?: boolean }) { +export function AccessTokensDatatable() { const query = useAccessTokens(); const tableState = useTableState(store, tableKey); @@ -25,7 +25,7 @@ export function AccessTokensDatatable({ canExit }: { canExit?: boolean }) { title="Access tokens" titleIcon={Key} renderTableActions={(selectedItems) => ( - + )} data-cy="access-tokens-datatable" /> diff --git a/app/react/portainer/account/AccountView/AccessTokensDatatable/TableActions.tsx b/app/react/portainer/account/AccountView/AccessTokensDatatable/TableActions.tsx index e59a9120d..ce78f89ba 100644 --- a/app/react/portainer/account/AccountView/AccessTokensDatatable/TableActions.tsx +++ b/app/react/portainer/account/AccountView/AccessTokensDatatable/TableActions.tsx @@ -9,10 +9,8 @@ import { useDeleteAccessTokensMutation } from './useDeleteAccessTokensMutation'; export function TableActions({ selectedItems, - canExit, }: { selectedItems: AccessToken[]; - canExit?: boolean; }) { const deleteMutation = useDeleteAccessTokensMutation(); @@ -25,11 +23,7 @@ export function TableActions({ data-cy="access-tokens-delete-button" /> - + Add access token