Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6eb7ed6
feat: 홈 화면 기본 구조 생성 (헤더, 일기 박스)
wjdalss21 Jun 17, 2026
f98f8f3
feat: Header variant 분리 (logo/title) 및 홈 화면 적용
wjdalss21 Jun 17, 2026
d959392
feat: 사건기록 페이지 생성 및 로고 헤더 적용 (/records)
wjdalss21 Jun 17, 2026
5a6643e
fix: diaryBox 고정 폭을 max-width + width 100%로 반응형 처리
wjdalss21 Jun 17, 2026
a04b781
feat: 감정일기 작성 버튼 /diary/new 네비게이션 연결
wjdalss21 Jun 17, 2026
6ab4d7e
feat: 홈 화면 캐릭터 이미지 교체 및 위치 조정
wjdalss21 Jun 17, 2026
24aed23
fix: 홈 화면 코드래빗 피드백 반영
wjdalss21 Jun 18, 2026
f67c9e9
refactor: 홈 화면 typography 믹신 적용
wjdalss21 Jun 18, 2026
2b194f9
fix: 비로그인 알아보기 박스 위치 수정
wjdalss21 Jun 18, 2026
e5188f7
feat: 홈 화면에 통계 섹션 및 구분선 통합
wjdalss21 Jun 18, 2026
f2154c6
chore: 개발 편의용 로그인 상태 강제 설정 (배포 전 제거 필요)
wjdalss21 Jun 18, 2026
47e7138
feat: 홈 화면 진행중인 사건 섹션 UI 구현
wjdalss21 Jun 18, 2026
a31fe0e
fix: dev 머지 충돌 해결 (ActiveCasesSection 유지)
wjdalss21 Jun 18, 2026
f02cec2
fix: 진행중인 사건 카드 수정 - CaseCard 원본 구조 유지, 좌측 컬러바 제거, Avatar 좌측 배치
wjdalss21 Jun 18, 2026
e92b35f
fix: CaseCard preview 텍스트 컬러 black-700으로 수정
wjdalss21 Jun 18, 2026
804f450
fix: 진행중인 사건 섹션 내 진행중 뱃지 제거
wjdalss21 Jun 18, 2026
fd1b1f3
fix: 진행중인 사건 카드 푸터 레이아웃 및 외곽선 black-700 2px inset 적용
wjdalss21 Jun 18, 2026
8561f05
fix: 진행중인 사건 카드 preview-footer 간격 8px 조정
wjdalss21 Jun 18, 2026
cca1afc
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 18, 2026
2afe223
fix: 코드래빗 리뷰 반영 - 린트, loading/error 상태 처리, onClick li로 이동
wjdalss21 Jun 18, 2026
cff2117
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 18, 2026
28c7139
chore: 홈 화면 캐릭터 이미지 추가
wjdalss21 Jun 18, 2026
200262e
refactor: 홈 페이지를 /home에서 / 루트 경로로 이동
wjdalss21 Jun 18, 2026
692170e
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 18, 2026
80b320a
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 18, 2026
c5eed1d
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 18, 2026
b6f81f0
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 18, 2026
7937e2c
feat: 홈 화면 새 사건 버튼 및 서비스 정보 푸터 구현
wjdalss21 Jun 18, 2026
12871f4
feat: 새 사건 버튼 카테고리 선택 모달 구현
wjdalss21 Jun 18, 2026
9408df5
fix: CodeRabbit 리뷰 반영 — isLoggedIn 하드코딩 제거, 서비스 링크 경로 교체, SCSS 빈 줄 정리
wjdalss21 Jun 18, 2026
d10f250
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 19, 2026
889d131
feat: HomeGreeting 컴포넌트 추가 및 DB 닉네임 기반 인사말 적용
wjdalss21 Jun 19, 2026
6aa97cf
fix: 통계 카테고리 API 불필요한 인증 체크 제거
wjdalss21 Jun 19, 2026
f63d464
feat: 통계 데이터 없을 때 목 데이터 fallback 추가 (UI 확인용)
wjdalss21 Jun 19, 2026
ed7b7df
chore: 진행중인 사건 목 데이터 제거
wjdalss21 Jun 19, 2026
55e3268
feat: 새 사건 버튼 카테고리 클릭 시 진술 작성 페이지로 이동
wjdalss21 Jun 19, 2026
cd5dfc5
fix: 서비스 소개·고객문의 링크 미연결 항목 span으로 교체
wjdalss21 Jun 19, 2026
83440e7
style: NewCaseButton SCSS declaration-empty-line-before 위반 수정
wjdalss21 Jun 19, 2026
0c0faa6
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 19, 2026
5d2c535
feat: 새 사건 버튼 카테고리 클릭 시 POST /api/rooms 호출 후 statement 이동
wjdalss21 Jun 19, 2026
9962e7b
feat: 새 사건 버튼 — POST /api/rooms 후 roomId+category를 statement 페이지로 전달
wjdalss21 Jun 19, 2026
7485cea
fix: 새 사건 버튼 중복 클릭 방지 및 5초 타임아웃 추가
wjdalss21 Jun 19, 2026
3d13b90
feat: 진행중인 사건 없을 때 캐릭터 이미지 추가
wjdalss21 Jun 19, 2026
b41e750
fix: 진행중인 사건 빈 상태 이미지 Next.js Image → img 태그로 교체
wjdalss21 Jun 19, 2026
76101ed
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 19, 2026
770ae62
fix: PR73 CodeRabbit 피드백 반영
wjdalss21 Jun 19, 2026
63d2c96
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 19, 2026
f9ace36
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 19, 2026
c0ca4cc
Merge remote-tracking branch 'origin/dev' into feature/homepage-jm
wjdalss21 Jun 19, 2026
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
Binary file added public/images/characters/character-case.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion src/components/home/ActiveCasesSection.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,23 @@
color: v.$color-black-400;
}

.emptyState {
display: flex;
flex-direction: column;
align-items: center;
gap: fn.r(12);
padding: fn.r(24) 0;
}

.emptyImage {
width: fn.r(80);
height: fn.r(80);
object-fit: contain;
}

.empty {
@include m.text-body-s;

color: v.$color-black-400;
text-align: center;
padding: fn.r(24) 0;
}
13 changes: 12 additions & 1 deletion src/components/home/ActiveCasesSection.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client'

import Image from 'next/image'
import { useRouter } from 'next/navigation'
import CaseCard from '@/components/ui/CaseCard'
import Avatar, { AvatarGroup } from '@/components/ui/Avatar'
Expand Down Expand Up @@ -28,7 +29,17 @@ export default function ActiveCasesSection() {
<h2 className={styles.title}>진행중인 사건</h2>

{cases.length === 0 ? (
<p className={styles.empty}>아직 진행중인 사건이 없어요</p>
<div className={styles.emptyState}>
<Image
src="/images/characters/character-case.png"
alt=""
width={80}
height={80}
className={styles.emptyImage}
priority
/>
<p className={styles.empty}>아직 진행중인 사건이 없어요</p>
</div>
) : (
<ul className={styles.list}>
{cases.map((item) => (
Expand Down
8 changes: 8 additions & 0 deletions src/components/home/NewCaseButton.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
gap: fn.r(8);
}

.errorMessage {
@include m.text-label-s;

color: #e53e3e;
text-align: center;
width: 100%;
}

.item {
display: flex;
align-items: center;
Expand Down
32 changes: 29 additions & 3 deletions src/components/home/NewCaseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,39 @@ const CATEGORY_ITEMS: { category: CategoryGroup; label: string }[] = [

export default function NewCaseButton() {
const [isOpen, setIsOpen] = useState(false)
const [isCreating, setIsCreating] = useState(false)
const [errorMessage, setErrorMessage] = useState<string | null>(null)
const router = useRouter()

useEffect(() => {
document.body.style.overflow = isOpen ? 'hidden' : ''
return () => { document.body.style.overflow = '' }
}, [isOpen])

const handleCategoryClick = (category: CategoryGroup) => {
const handleCategoryClick = async (category: CategoryGroup) => {
if (isCreating) return
setIsOpen(false)
router.push(`/disputes/test/statement?category=${category}`)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앜 여기 /test/ 말고 /[id] 로 변경해줘요

setIsCreating(true)
setErrorMessage(null)
const controller = new AbortController()
const timeout = setTimeout(() => controller.abort(), 5000)
try {
const res = await fetch('/api/rooms', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ categoryGroup: category }),
signal: controller.signal,
})
Comment thread
coderabbitai[bot] marked this conversation as resolved.
const json = await res.json()
if (!json.success) throw new Error(json.error?.message)
router.push(`/disputes/${json.data.id}/statement?category=${category}`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

성공 시 이동 경로가 PR 목표(/disputes/[roomId]/)와 다릅니다.

현재는 /disputes/${json.data.id}/statement?category=...로 이동합니다. 제공된 PR 목표/테스트 계획 기준이면 생성 성공 후 /disputes/${roomId}/로 이동해야 해서 요구사항 불일치 가능성이 큽니다.

제안 패치
-      router.push(`/disputes/${json.data.id}/statement?category=${category}`)
+      router.push(`/disputes/${json.data.id}/`)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
router.push(`/disputes/${json.data.id}/statement?category=${category}`)
router.push(`/disputes/${json.data.id}/`)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/home/NewCaseButton.tsx` at line 44, The navigation path in the
NewCaseButton component after successful case creation does not align with the
PR objectives. Currently, the router.push call navigates to
/disputes/${json.data.id}/statement?category=${category}, but according to the
PR goals, it should navigate to /disputes/${roomId}/ instead. Update the
router.push call to use the correct destination path without the /statement
suffix and category parameter, ensuring the navigation takes the user to the
disputes page as intended.

} catch (err) {
setErrorMessage(err instanceof Error && err.message ? err.message : '사건 생성에 실패했습니다. 다시 시도해주세요.')
setIsOpen(true)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
} finally {
clearTimeout(timeout)
setIsCreating(false)
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

return (
Expand All @@ -39,8 +62,11 @@ export default function NewCaseButton() {
>
<div className={styles.panel} onClick={(e) => e.stopPropagation()}>
<div className={styles.categoryBox}>
{errorMessage && (
<p className={styles.errorMessage}>{errorMessage}</p>
)}
{CATEGORY_ITEMS.map(({ category, label }) => (
<button key={category} className={styles.item} onClick={() => handleCategoryClick(category)}>
<button key={category} className={styles.item} onClick={() => handleCategoryClick(category)} disabled={isCreating}>
<CategoryIcon category={category} />
<span className={styles.itemLabel}>{label}</span>
</button>
Expand Down