mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-18 00:52:21 +03:00
Fix pipeline performance issue (#1070)
This commit is contained in:
parent
43f20ebf74
commit
207d7b6b10
@ -162,10 +162,16 @@ export function HooksCompanyBoard({
|
||||
);
|
||||
|
||||
const synchronizeCompanyProgresses = useRecoilCallback(
|
||||
({ set }) =>
|
||||
({ snapshot, set }) =>
|
||||
(companyBoardIndex: { [key: string]: CompanyProgress }) => {
|
||||
Object.entries(companyBoardIndex).forEach(([id, companyProgress]) => {
|
||||
set(companyProgressesFamilyState(id), companyProgress);
|
||||
if (
|
||||
JSON.stringify(
|
||||
snapshot.getLoadable(companyProgressesFamilyState(id)).getValue(),
|
||||
) !== JSON.stringify(companyProgress)
|
||||
) {
|
||||
set(companyProgressesFamilyState(id), companyProgress);
|
||||
}
|
||||
});
|
||||
},
|
||||
[],
|
||||
|
Loading…
Reference in New Issue
Block a user