Skip to content

Commit 7d73cad

Browse files
committed
chore: prettier/lint 에러 수정
1 parent 5e9d1b7 commit 7d73cad

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

src/common/component/ModifyTextField/ModifyTextField.tsx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,28 @@ function getSubGoalFieldState(hasValue: boolean): SubGoalFieldState {
2323
return hasValue ? 'filled' : 'empty';
2424
}
2525

26-
function getTodoFieldState(isFocused: boolean, isHovered: boolean, hasValue: boolean): TodoFieldState {
27-
if (isFocused) return hasValue ? 'modify_typing' : 'modify_clicked';
28-
if (hasValue) return 'modify_filled';
29-
if (isHovered) return 'modify_hover';
26+
function getTodoFieldState(
27+
isFocused: boolean,
28+
isHovered: boolean,
29+
hasValue: boolean,
30+
): TodoFieldState {
31+
if (isFocused) {
32+
return hasValue ? 'modify_typing' : 'modify_clicked';
33+
}
34+
if (hasValue) {
35+
return 'modify_filled';
36+
}
37+
if (isHovered) {
38+
return 'modify_hover';
39+
}
3040
return 'modify_empty';
3141
}
3242

3343
// ====== 스타일 결정 함수 ======
34-
function getWrapperClass(variant: ModifyTextFieldVariant, fieldState: SubGoalFieldState | TodoFieldState) {
44+
function getWrapperClass(
45+
variant: ModifyTextFieldVariant,
46+
fieldState: SubGoalFieldState | TodoFieldState,
47+
) {
3548
if (variant === 'subGoal') {
3649
return styles.subGoalVariants[fieldState as SubGoalFieldState];
3750
}
@@ -141,9 +154,10 @@ export default function ModifyTextField({
141154
} = useModifyTextFieldState({ onChange });
142155

143156
const hasValue = Boolean(value);
144-
const fieldState = variant === 'subGoal'
145-
? getSubGoalFieldState(hasValue)
146-
: getTodoFieldState(state.isFocused, state.isHovered, hasValue);
157+
const fieldState =
158+
variant === 'subGoal'
159+
? getSubGoalFieldState(hasValue)
160+
: getTodoFieldState(state.isFocused, state.isHovered, hasValue);
147161
const wrapperClass = getWrapperClass(variant, fieldState);
148162
const effectivePlaceholder = getPlaceholder(variant, placeholder);
149163
const inputProps = getInputProps({

src/page/home/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ const Home = () => {
1212
);
1313
};
1414

15-
export default Home;
15+
export default Home;

0 commit comments

Comments
 (0)