feat: The Big One UI #47
@@ -85,9 +85,8 @@ const useProgramStore = create<ProgramState>((set, get) => ({
|
|||||||
const rootGoals = phase["goals"] as Record<string, unknown>[];
|
const rootGoals = phase["goals"] as Record<string, unknown>[];
|
||||||
const flatList: GoalWithDepth[] = [];
|
const flatList: GoalWithDepth[] = [];
|
||||||
|
|
||||||
// Helper: Define this ONCE, outside the loop
|
|
||||||
const isGoal = (item: Record<string, unknown>) => {
|
const isGoal = (item: Record<string, unknown>) => {
|
||||||
return item["plan"] !== undefined && item["plan"] !== null;
|
return item["plan"] !== undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Recursive helper function
|
// Recursive helper function
|
||||||
|
|||||||
Reference in New Issue
Block a user