Skip to content

Commit

Permalink
chore: minor css fixes for roles and polices managment page (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNenashev authored Oct 2, 2023
1 parent 17afca9 commit e74032d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions odd-platform-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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';
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 {
Expand All @@ -22,7 +22,7 @@ const PolicyItem: React.FC<PolicyItemProps> = ({ policyId, name }) => {

const isAdministrator = name === 'Administrator';

const handleDelete = React.useCallback(
const handleDelete = useCallback(
() => dispatch(deletePolicy({ policyId })),
[policyId, deleteRole]
);
Expand All @@ -35,7 +35,7 @@ const PolicyItem: React.FC<PolicyItemProps> = ({ policyId, name }) => {
</Typography>
</Grid>
<Grid item container lg={6.73} flexWrap='nowrap' />
<Grid item lg={1.74}>
<Grid item lg={2}>
<S.ActionsContainer container item>
<Button
text={
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import React, { useCallback } from 'react';
import { Grid, Typography } from '@mui/material';
import TruncateMarkup from 'react-truncate-markup';
import { useTranslation } from 'react-i18next';
import { deleteRole } from 'redux/thunks';
import { Permission, type Role } from 'generated-sources';
import { Button, ConfirmationDialog } from 'components/shared/elements';
import { DeleteIcon, EditIcon } from 'components/shared/icons';
import { useAppDispatch } from 'redux/lib/hooks';
import TruncateMarkup from 'react-truncate-markup';
import { WithPermissions } from 'components/shared/contexts';
import { useTranslation } from 'react-i18next';
import RoleForm from '../RoleForm/RoleForm';
import * as S from './RoleItemStyles';

Expand All @@ -24,7 +24,7 @@ const RoleItem: React.FC<RoleItemProps> = ({ roleId, name, policies }) => {
const isUser = name === 'User';
const isAdministrator = name === 'Administrator';

const handleDelete = React.useCallback(
const handleDelete = useCallback(
() => dispatch(deleteRole({ roleId })),
[roleId, deleteRole]
);
Expand All @@ -49,7 +49,7 @@ const RoleItem: React.FC<RoleItemProps> = ({ roleId, name, policies }) => {
</div>
</TruncateMarkup>
</Grid>
<Grid item lg={1.74}>
<Grid item lg={2}>
<S.ActionsContainer container item>
<WithPermissions
permissionTo={Permission.ROLE_UPDATE}
Expand Down

0 comments on commit e74032d

Please sign in to comment.