Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jarydo committed Aug 28, 2024
1 parent 8bc0e09 commit f915dc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 28 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/admin/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ const UserList = ({ isASP, rowsPerPage = 10 }: UserListProps) => {
}

reloadMealRequests();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isASP, rowsPerPage, currentPage, reload]);

if (redirectTo) {
Expand Down
38 changes: 10 additions & 28 deletions frontend/src/components/mealrequest/AdminListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,9 @@ const AdminListView = ({ rowsPerPage = 10, donorId, aspId }: AdminListViewProps)
}
}
reloadMealRequests();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [filter, sort, currentPage, authenticatedUser]);

const handleDelete = (item: TABLE_LIBRARY_TYPES.TableNode) => () => {
// eslint-disable-next-line no-console
console.log("delete clicked for item", item.id);
};

const COLUMNS = [
{
label: "Date Requested",
Expand Down Expand Up @@ -657,29 +653,15 @@ const AdminListView = ({ rowsPerPage = 10, donorId, aspId }: AdminListViewProps)
},
{
label: "",
renderCell: (item: TABLE_LIBRARY_TYPES.TableNode) => {
if (!item.pending) {
return (
<Flex
cursor="pointer"
justifyContent="flex-end"
onClick={handleExpand(item)}
>
{ids.includes(item.id) ? <ChevronUpIcon /> : <ChevronDownIcon />}
</Flex>
);
}

return (
<HStack>
<DeleteIcon
onClick={handleDelete(item)}
cursor="pointer"
_hover={{ color: "primary.blue" }}
/>
</HStack>
);
},
renderCell: (item: TABLE_LIBRARY_TYPES.TableNode) => (
<Flex
cursor="pointer"
justifyContent="flex-end"
onClick={handleExpand(item)}
>
{ids.includes(item.id) ? <ChevronUpIcon /> : <ChevronDownIcon />}
</Flex>
),
},
];

Expand Down

0 comments on commit f915dc4

Please sign in to comment.