Skip to content

Commit

Permalink
refactor: remove noop function
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszGrajdek committed Sep 6, 2024
1 parent 80027ce commit cfbd0b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React, {useState} from 'react';
import type {SetOptional} from 'type-fest';
import BaseListItem from '@components/SelectionList/BaseListItem';
import type {BaseListItemProps, ListItem} from '@components/SelectionList/types';
import useThemeStyles from '@hooks/useThemeStyles';
import CategorySelector from '@pages/workspace/distanceRates/CategorySelector';
import * as Policy from '@userActions/Policy/Policy';

function SpendCategorySelectorListItem<TItem extends ListItem>({item, onSelectRow, isFocused}: BaseListItemProps<TItem>) {
type SpendCategorySelectorListItemProps<TItem extends ListItem> = SetOptional<BaseListItemProps<TItem>, 'onSelectRow'>;

function SpendCategorySelectorListItem<TItem extends ListItem>({item, onSelectRow = () => {}, isFocused}: SpendCategorySelectorListItemProps<TItem>) {
const styles = useThemeStyles();
const [isCategoryPickerVisible, setIsCategoryPickerVisible] = useState(false);
const {policyID, groupID, categoryID} = item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ function WorkspaceCategoriesSettingsPage({policy, route}: WorkspaceCategoriesSet
<SpendCategorySelectorListItem
key={item.keyForList}
item={item}
onSelectRow={() => {}}
showTooltip
/>
));
Expand Down

0 comments on commit cfbd0b3

Please sign in to comment.