Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/page/todo/lowerTodo/LowerTodo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import * as styles from './LowerTodo.css';
import { LowerTodoHeader, MandalCompleteButton, TodoFields } from './component';
import { useLowerTodoState, useLowerTodoAI } from './hook';
import { toMainSubGoals } from './utils/goal';

Check warning on line 7 in src/page/todo/lowerTodo/LowerTodo.tsx

View workflow job for this annotation

GitHub Actions / build

There should be at least one empty line between import groups

Check warning on line 7 in src/page/todo/lowerTodo/LowerTodo.tsx

View workflow job for this annotation

GitHub Actions / build

There should be at least one empty line between import groups
import { DEFAULT_TEXT, ALERT } from '@/common/constants/todo';
import { truncateText } from '@/common/util/format';

Check warning on line 9 in src/page/todo/lowerTodo/LowerTodo.tsx

View workflow job for this annotation

GitHub Actions / build

There should be no empty line within import group

Check warning on line 9 in src/page/todo/lowerTodo/LowerTodo.tsx

View workflow job for this annotation

GitHub Actions / build

There should be no empty line within import group

import GradientBackground from '@/common/component/Background/GradientBackground';
import { PATH } from '@/route';
Expand Down Expand Up @@ -68,6 +68,9 @@
todos.some((todo) => todo.title.trim() !== ''),
);

const currentTodosFilled = currentTodos.every((todo) => todo.title.trim() !== '');
const isAiDisabled = isAiUsed[selectedGoalIndex] || currentTodosFilled;

const handleEnter = (index: number, todo: any) => {
handleTodoEnter(index, todo);
};
Expand All @@ -82,7 +85,7 @@
title={selectedGoalTitle}
isTooltipOpen={isTooltipOpen}
setIsTooltipOpen={setIsTooltipOpen}
isAiDisabled={isAiUsed[selectedGoalIndex]}
isAiDisabled={isAiDisabled}
handleOpenAiModal={handleOpenAiModal}
/>

Expand Down
2 changes: 1 addition & 1 deletion src/page/todo/lowerTodo/component/TodoFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const TodoFields = ({ values, onChange, onEnter, selectedCoreGoalTitle }: TodoFi
const newTodo = { ...values[index], cycle: newCycle };
onChange(updatedValues(index, newTodo));

if (onEnter) {
if (newTodo.title.trim() !== '' && onEnter) {
onEnter(index, newTodo);
}
};
Expand Down
Loading