From e74032dce296669f288ab8c2c33f90e177781420 Mon Sep 17 00:00:00 2001 From: Andrey Nenashev Date: Mon, 2 Oct 2023 11:26:26 +0200 Subject: [PATCH] chore: minor css fixes for roles and polices managment page (#1450) --- odd-platform-ui/pnpm-lock.yaml | 8 ++++---- .../Management/PolicyList/PolicyItem/PolicyItem.tsx | 8 ++++---- .../Management/RolesList/RoleItem/RoleItem.tsx | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/odd-platform-ui/pnpm-lock.yaml b/odd-platform-ui/pnpm-lock.yaml index 2e7cffb41..fc19fe5db 100644 --- a/odd-platform-ui/pnpm-lock.yaml +++ b/odd-platform-ui/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - overrides: glob-parent@<5.1.2: '>=5.1.2' @@ -7706,3 +7702,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/odd-platform-ui/src/components/Management/PolicyList/PolicyItem/PolicyItem.tsx b/odd-platform-ui/src/components/Management/PolicyList/PolicyItem/PolicyItem.tsx index a537df941..ae215aab0 100644 --- a/odd-platform-ui/src/components/Management/PolicyList/PolicyItem/PolicyItem.tsx +++ b/odd-platform-ui/src/components/Management/PolicyList/PolicyItem/PolicyItem.tsx @@ -1,5 +1,6 @@ -import React from 'react'; +import React, { useCallback } from 'react'; import { Grid, Typography } from '@mui/material'; +import { useTranslation } from 'react-i18next'; import { deletePolicy, deleteRole } from 'redux/thunks'; import { Permission, type Policy } from 'generated-sources'; import { Button, ConfirmationDialog } from 'components/shared/elements'; @@ -7,7 +8,6 @@ import { DeleteIcon, EditIcon } from 'components/shared/icons'; import { usePermissions } from 'lib/hooks'; import { useAppDispatch } from 'redux/lib/hooks'; import { WithPermissions } from 'components/shared/contexts'; -import { useTranslation } from 'react-i18next'; import * as S from './PolicyItemStyles'; interface PolicyItemProps { @@ -22,7 +22,7 @@ const PolicyItem: React.FC = ({ policyId, name }) => { const isAdministrator = name === 'Administrator'; - const handleDelete = React.useCallback( + const handleDelete = useCallback( () => dispatch(deletePolicy({ policyId })), [policyId, deleteRole] ); @@ -35,7 +35,7 @@ const PolicyItem: React.FC = ({ policyId, name }) => { - +