refactor: straightened logic, replaces throttle with mantine debounced
This commit is contained in:
@ -18,7 +18,9 @@ const useDealsList = ({ boardId }: Props) => {
|
||||
useEffect(() => {
|
||||
if (boardId === undefined) {
|
||||
setDeals([]);
|
||||
} else if (data?.deals) {
|
||||
return;
|
||||
}
|
||||
if (data?.deals) {
|
||||
setDeals(data.deals);
|
||||
}
|
||||
}, [data?.deals, boardId]);
|
||||
|
||||
Reference in New Issue
Block a user