Skip to content

Commit

Permalink
Improve types, fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Jun 24, 2024
1 parent e50f460 commit c008473
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
38 changes: 20 additions & 18 deletions client/components/UI/List/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ import classNames from 'classnames';
* @name Column
* @description Column Component of a list item
*/
export const Column = ({children, grow, border, noPadding, hasCheck, checked, className}) => (

interface IProps {
children: Array<JSX.Element> | JSX.Element;
grow?: boolean;
border?: boolean;
noPadding?: boolean;
hasCheck?: boolean;
checked?: boolean;
className?: string;
}

export const Column = ({
children,
grow = false,
border = true,
noPadding = false,
hasCheck = false,
checked,
className,
}: IProps) => (
<div
className={classNames(
'sd-list-item__column',
Expand All @@ -24,20 +43,3 @@ export const Column = ({children, grow, border, noPadding, hasCheck, checked, cl
{children}
</div>
);

Column.propTypes = {
children: PropTypes.node.isRequired,
grow: PropTypes.bool,
border: PropTypes.bool,
noPadding: PropTypes.bool,
hasCheck: PropTypes.bool,
checked: PropTypes.bool,
className: PropTypes.string,
};

Column.defaultProps = {
grow: false,
border: true,
noPadding: false,
hasCheck: false,
};
1 change: 1 addition & 0 deletions client/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ export const getUsersForDesk = (desk, globalUserList = []) => {
if (!desk) return globalUserList;

const deskMembersSet = new Set(desk.members.map((member) => member.user));

return globalUserList.filter(({_id}) => deskMembersSet.has(_id));
};

Expand Down

0 comments on commit c008473

Please sign in to comment.