-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: 타입 마이그레이션 (#122) #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 28 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
43df442
fix: 리액션 API를 백엔드 명세에 맞게 마이그레이션 (#122)
AndyH0ng 18e24e9
refactor: deprecated Slide 타입을 SlideListItem으로 마이그레이션 (#122)
AndyH0ng cc6b96c
fix: MSW 단일 슬라이드 조회에 prevSlideId/nextSlideId 추가 (#122)
AndyH0ng 3e8ca27
fix: analytics 목 데이터에서 slide.id → slide.slideId 수정 (#122)
AndyH0ng b13c8ce
chore: MSW 백엔드 코드 반영 (#122)
AndyH0ng 6ad4d73
refactor: useOpinions 마이그레이션 (#122)
AndyH0ng fb84674
chore: 목데이터 UUID 매칭 못해도 댓글 삭제하도록 수정 (#122)
AndyH0ng 8c801f7
refactor: 미사용 훅 제거 및 내부 전용 export 정리 (#122)
AndyH0ng 7f627a3
refactor: 3계층 아키텍처 위반 수정 (#122)
AndyH0ng 7319629
feat: TextField 공용 컴포넌트 구현 (#122)
AndyH0ng 0dc834f
feat: 제목 수정 팝오버 공용 컴포넌트 구현 (#122)
AndyH0ng 97cda1f
design: 볼륨 인디케이터 Figma에 맞게 구현 (#122)
AndyH0ng 612449e
design: 하드웨어 테스트 페이지 레이아웃 리디자인 (#122)
AndyH0ng 9108a19
design: 하드웨어 테스트 페이지 헤더 리디자인 (#122)
AndyH0ng 69db36c
design: 영상 녹화 시 로고 누를 때 종료 모달 뜨도록 설정 (#122)
AndyH0ng 279dfc4
design: 많은 피드백을 받은 슬라이드 카드 최소 높이 설정 (#122)
AndyH0ng 4dbda22
feat: 토스트 유틸 클래스 교체 (#122)
AndyH0ng dd0770e
chore: 녹화 중단 모달 텍스트 수정 (#122)
AndyH0ng a51ab90
docs: 주석 제거 (#122)
AndyH0ng 7038258
design: 표시되는 스켈레톤 수 조절 (#122)
AndyH0ng 07161b7
design: 피드백 모바일 화면 리액션 버튼 리디자인 (#122)
AndyH0ng 47356d7
design: 피드백 모바일 화면 리액션 버튼 리디자인 (#122)
AndyH0ng 2964431
refactor: readOnly → readOnlyContent로 교체 (#122)
AndyH0ng c640b68
design: selected 시 페이드 효과 (#122)
AndyH0ng f63b853
refactor: 제목 편집 컴포넌트 readOnly 시 불필요한 훅 제거 (#122)
AndyH0ng 65013c1
Merge branch 'develop' into refactor/type-migration-122
AndyH0ng cb8c527
fix: 빌드 오류 해결 (#122)
AndyH0ng 2e17601
docs: 주석 추가 (#122)
AndyH0ng f888450
Merge branch 'develop' into refactor/type-migration-122
AndyH0ng 5e6dfb0
chore: 빌드 오류 해결 (#122)
AndyH0ng 936a1c2
refactor: 코드 리뷰 반영 (#122)
AndyH0ng 6dfeb13
refactor: emojiType 레코드로 저장 (#122)
AndyH0ng 41b288c
refactor: type → emojiType로 변경 (#122)
AndyH0ng 385de42
feat: timestampMs로 마이그레이션 (#122)
AndyH0ng 3bb9f05
fix: 빌드 오류 해결 (#122)
AndyH0ng f1f06f7
fix: reaction/summary 엔드포인트 백엔드랑 맞춤 (#122)
AndyH0ng fc6e905
fix: 엔드포인트 백엔드랑 맞춤 (#122)
AndyH0ng 1e0f80c
chore: 불필요한 엔드포인트 제거 (#122)
AndyH0ng 1948c75
chore: 불필요한 엔드포인트 제거 (#122)
AndyH0ng 24224b1
feat: 댓글 수정 구현 (#122)
AndyH0ng a42d336
feat: 댓글 API 연결 (#122)
AndyH0ng 32e1255
feat: 컨테이너에서 댓글 호출 (#122)
AndyH0ng ad228d7
fix: 안쓰는 import 제거 (#122)
AndyH0ng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,47 @@ | ||
| /** | ||
| * @file reactions.ts * @description Slide reaction APIs. | ||
| /** | ||
| * @file reactions.ts | ||
| * @description 슬라이드 리액션 관련 API 엔드포인트 | ||
| */ | ||
| import { apiClient } from '@/api'; | ||
| import { apiClient } from '@/api/client'; | ||
| import type { ToggleSlideReactionDto } from '@/api/dto'; | ||
| import type { ReactionCountDto } from '@/api/dto/reactions.dto'; | ||
| import type { ApiResponse } from '@/api/handlers'; | ||
| import type { Reaction } from '@/types/script'; | ||
| import type { ReactionCountDto, ToggleSlideReactionResponseDto } from '@/api/dto/reactions.dto'; | ||
| import type { ApiResponse } from '@/types/api'; | ||
|
|
||
| /** | ||
| * Toggle a reaction for a slide. | ||
| * 슬라이드 리액션 토글 | ||
| * | ||
| * @param slideId - 슬라이드 ID | ||
| * @param data - 리액션 데이터 | ||
| * @returns 업데이트된 리액션 배열 | ||
| * @returns { active: boolean } - 토글 후 활성 상태 | ||
| */ | ||
| export async function toggleReaction( | ||
| slideId: string, | ||
| data: ToggleSlideReactionDto, | ||
| ): Promise<Reaction[]> { | ||
| const { data: response } = await apiClient.post<ApiResponse<Reaction[]>>( | ||
| ): Promise<ToggleSlideReactionResponseDto> { | ||
| const { data: response } = await apiClient.post<ApiResponse<ToggleSlideReactionResponseDto>>( | ||
| `/slides/${slideId}/reactions/toggle`, | ||
| data, | ||
| ); | ||
| return response.success; | ||
|
|
||
| if (response.resultType === 'SUCCESS') { | ||
| return response.success; | ||
| } | ||
| throw new Error(response.error.reason); | ||
| } | ||
|
|
||
| /** | ||
| * Get reaction summary counts for a slide. | ||
| * 슬라이드 리액션 집계 조회 | ||
| * | ||
| * @param slideId - 슬라이드 ID | ||
| * @returns Record<ReactionType, number> - 이모지별 카운트 | ||
| */ | ||
| export async function getSlideReactionSummary(slideId: string) { | ||
| const { data } = await apiClient.get<ApiResponse<ReactionCountDto>>( | ||
| `/slides/${slideId}/reactions/summary`, | ||
| ); | ||
|
|
||
| // ⚠️ 핵심: success 안에 있는 reactions 객체만 리턴! (없으면 빈 객체) | ||
| return data.success?.reactions ?? {}; | ||
| if (data.resultType === 'SUCCESS') { | ||
| return data.success.reactions; | ||
| } | ||
| throw new Error(data.error.reason); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,34 @@ | ||
| import { apiClient } from '@/api'; | ||
| import type { Reaction, ReactionType } from '@/types/script'; | ||
| /** | ||
| * @file videoReactions.ts | ||
| * @description 영상 리액션 관련 API 엔드포인트 | ||
| */ | ||
| import { apiClient } from '@/api/client'; | ||
| import type { | ||
| ToggleVideoReactionDto, | ||
| ToggleVideoReactionResponseDto, | ||
| } from '@/api/dto/reactions.dto'; | ||
| import type { ApiResponse } from '@/types/api'; | ||
|
|
||
| export interface ToggleVideoReactionRequest { | ||
| type: ReactionType; | ||
| timestamp: number; | ||
| } | ||
|
|
||
| export interface ToggleVideoReactionResponse { | ||
| timestamp: number; | ||
| reactions: Reaction[]; | ||
| } | ||
| export type { ToggleVideoReactionDto as ToggleVideoReactionRequest }; | ||
|
|
||
| export const toggleVideoReaction = async (videoId: string, data: ToggleVideoReactionRequest) => { | ||
| const { data: response } = await apiClient.post<ToggleVideoReactionResponse>( | ||
| /** | ||
| * 영상 리액션 토글 | ||
| * | ||
| * @param videoId - 영상 ID | ||
| * @param data - 리액션 데이터 (type + timestamp) | ||
| * @returns { active: boolean } - 토글 후 활성 상태 | ||
| */ | ||
| export async function toggleVideoReaction( | ||
| videoId: string, | ||
| data: ToggleVideoReactionDto, | ||
| ): Promise<ToggleVideoReactionResponseDto> { | ||
| const { data: response } = await apiClient.post<ApiResponse<ToggleVideoReactionResponseDto>>( | ||
| `/videos/${videoId}/reactions`, | ||
| data, | ||
| ); | ||
| return response; | ||
| }; | ||
|
|
||
| if (response.resultType === 'SUCCESS') { | ||
| return response.success; | ||
| } | ||
| throw new Error(response.error.reason); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.