Improved activity editor re-renders (#4149)
* Refactor task count * Fixed show page rerender * Less rerenders and way better title and body UX * Finished breaking down activity editor subscriptions * Removed console.log * Last console.log * Fixed bugs and cleaned
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
import { ObjectRecordEdge } from '@/object-record/types/ObjectRecordEdge';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
|
||||
export const getChildRelationArray = ({
|
||||
childRelation,
|
||||
}: {
|
||||
childRelation: any;
|
||||
}) => {
|
||||
if (isDefined(childRelation.edges) && Array.isArray(childRelation.edges)) {
|
||||
return childRelation.edges.map((edge: ObjectRecordEdge) => edge.node);
|
||||
} else {
|
||||
return childRelation;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user