cart adding fixed, added a reviews section

This commit is contained in:
User
2025-01-11 09:54:09 +03:00
parent 8fc0960037
commit 3e4890b66a
23446 changed files with 2905836 additions and 12824 deletions

View File

@@ -0,0 +1,20 @@
import uniqBy from 'lodash/uniqBy';
import isFunction from 'lodash/isFunction';
/**
* This is configuration option that decides how to filter for unique values only:
*
* - `false` means "no filter"
* - `true` means "use recharts default filter"
* - function means "use return of this function as the default key"
*/
export function getUniqPayload(payload, option, defaultUniqBy) {
if (option === true) {
return uniqBy(payload, defaultUniqBy);
}
if (isFunction(option)) {
return uniqBy(payload, option);
}
return payload;
}