Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mav-Ivan committed Nov 17, 2023
1 parent d70083b commit 22ee20b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ const CategoriesContainer = () => {
sort: sortOptions,
itemsPerPage,
resource: ResourcesTabsEnum.Categories,
sx: styles.table,
rename: true
sx: styles.table
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
ErrorResponse,
TableItem,
ResourcesTableData,
TableRowAction
TableRowAction,
ResourcesTabsEnum
} from '~/types'
import { roundedBorderTable } from '~/containers/my-cooperations/cooperations-container/CooperationContainer.styles'

Expand Down Expand Up @@ -90,7 +91,10 @@ const MyResourcesTable = <T extends TableItem>({

const rowActions: TableRowAction[] = [
{
label: !rename ? t('common.edit') : t('common.rename'),
label:
resource === ResourcesTabsEnum.Categories
? t('common.rename')
: t('common.edit'),
func: onEdit
},
{
Expand Down

0 comments on commit 22ee20b

Please sign in to comment.