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
14 changes: 0 additions & 14 deletions src/pages/CasePage/CaseDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@

type LocationState = { state?: { title?: string } };

// 케이스 번호를 영어 숫자로 변환 (1 → "one", 2 → "two", ...)
function getCaseNumberName(num: number): string {
const names: Record<number, string> = {
1: "one", 2: "two", 3: "three", 4: "four", 5: "five", 6: "six", 7: "seven",
8: "eight", 9: "nine", 10: "ten", 11: "eleven", 12: "twelve", 13: "thirteen",
14: "fourteen", 15: "fifteen", 16: "sixteen", 17: "seventeen", 18: "eighteen",
19: "nineteen", 20: "twenty", 21: "twentyone", 22: "twentytwo", 23: "twentythree",
24: "twentyfour", 25: "twentyfive", 26: "twentysix", 27: "twentyseven",
28: "twentyeight", 29: "twentynine", 30: "thirty", 31: "thirtyone",
32: "thirtytwo", 33: "thirtythree", 34: "thirtyfour", 35: "thirtyfive"
};
return names[num] || String(num);
}

// 번역 키로 번역을 시도하고, 없으면 원본 반환
function tryTranslate(t: (key: any) => string, key: string, fallback?: string): string {
try {
Expand Down Expand Up @@ -103,7 +89,7 @@
return tryTranslate(t, titleField[0], titleField[0]);
}
return tryTranslate(t, titleField || "사례", titleField || "사례");
}, [caseId, titleField, loc?.state?.title, t]);

Check warning on line 92 in src/pages/CasePage/CaseDetailPage.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useMemo has an unnecessary dependency: 'caseId'. Either exclude it or remove the dependency array

// 섹션 데이터 정규화 (번역 적용)
const summaryLines = useMemo(
Expand Down
18 changes: 10 additions & 8 deletions src/pages/HomePage/HomePage.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ body {
margin-bottom: 10px;
letter-spacing: -0.02em;
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
padding-right: 60px;
padding-right: 80px;
}

.hero .title {
Expand Down Expand Up @@ -190,29 +190,30 @@ body {
min-height: 120px;
background: #ffffff;
border-radius: 28px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.05);

box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.05);
padding: 20px 24px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
transition: transform 0.12s ease;
transition: transform 0.2s ease, box-shadow 0.2s ease;
gap: 10px;
}

.new-card:hover {
transform: translateY(-2px);
transform: translateY(-2px) scale(1.01);
}

.card-text {
display: flex;
flex-direction: column;
flex: 1;
word-break: keep-all;
white-space: normal;
flex: 1 1 auto; /* 기존 flex 유지 */
min-width: 0; /* ★ 추가: iOS에서 flex item 줄바꿈 보장 */
word-break: break-word;
overflow-wrap: break-word;
}


.card-text .title {
font-size: 20px;
font-weight: 700;
Expand All @@ -229,6 +230,7 @@ body {

/* 오른쪽 아이콘 */
.card-icon {
flex-shrink: 0; /* 기존 유지 */
width: 60px;
height: auto;
object-fit: contain;
Expand Down
Loading