clean up and fix errors

This commit is contained in:
Ren Amamiya
2023-04-19 08:50:32 +07:00
parent c72798507e
commit 697caca77b
13 changed files with 83 additions and 78 deletions

View File

@@ -38,11 +38,3 @@ export const getParentID = (arr: string[], fallback: string) => {
return parentID;
};
export const filterDuplicateParentID = (arr) => {
const filteredArray = arr.filter(
(item, index) => index === arr.findIndex((other) => item.parent_id === other.parent_id)
);
return filteredArray;
};