Skip to content

Commit 5680b6f

Browse files
authored
Merge pull request #161 from depromeet/qa-smallaction
refactor: 회고 QA
2 parents 6b47177 + 10514b4 commit 5680b6f

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/app/(protected)/action/complete/_component/CharacterMotivation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function CharacterMotivation({ currentTask, nickname }: Props) {
1111
잘했어요! 이제
1212
<br />
1313
<span className="text-component-accent-secondary">
14-
{currentTask.persona?.name} {nickname}
14+
{currentTask.persona?.name} {nickname}
1515
</span>
1616
으로
1717
<br />

src/app/(protected)/retrospection/[taskId]/_components/RetrospectFocusContent.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ const RetrospectFocusContent = ({
8282
window.addEventListener("touchend", handleEnd);
8383
};
8484

85+
// 슬라이더 위치 계산 - 0일 때 왼쪽 끝에 정확히 위치하도록 조정
86+
const sliderPosition =
87+
retrospectContent.concentration === 0
88+
? "-8px"
89+
: `calc(${(retrospectContent.concentration / 5) * 100}% - ${BAR.SLIDER_RADIUS}px)`;
90+
8591
return (
8692
<div className="w-full mx-2 mt-1">
8793
<div
@@ -98,8 +104,8 @@ const RetrospectFocusContent = ({
98104
className="absolute rounded-full bg-line-tertiary"
99105
style={{
100106
height: `${BAR.HEIGHT}px`,
101-
width: `calc(100% + ${BAR.SLIDER_RADIUS * 2}px)`, // 16px 양쪽 추가
102-
left: `-${BAR.SLIDER_RADIUS}px`, // 왼쪽으로 16px 이동
107+
width: `calc(100% + ${BAR.SLIDER_RADIUS * 2}px)`,
108+
left: `-${BAR.SLIDER_RADIUS}px`,
103109
}}
104110
/>
105111

@@ -132,11 +138,11 @@ const RetrospectFocusContent = ({
132138

133139
{/* 슬라이더 핸들 */}
134140
<div
135-
className="absolute m-3 z-30 rounded-full border-2 border-white bg-white shadow"
141+
className="absolute z-30 rounded-full border-2 border-white bg-white shadow"
136142
style={{
137-
width: `${BAR.SLIDER_RADIUS * 2}px`,
138-
height: `${BAR.SLIDER_RADIUS * 2}px`,
139-
left: `calc(${(retrospectContent.concentration / 5) * 100}% - ${BAR.SLIDER_RADIUS * 2}px)`,
143+
width: `${BAR.SLIDER_RADIUS * 2 - 2}px`,
144+
height: `${BAR.SLIDER_RADIUS * 2 - 2}px`,
145+
left: sliderPosition,
140146
transition: "left 0.2s ease",
141147
}}
142148
/>

0 commit comments

Comments
 (0)