refactor: FSD 구조 강화 및 파일 500줄 제한에 따른 대규모 리팩토링
- SpaceWorkspaceWidget 로직을 전용 훅 및 유틸리티로 분리 (900줄 -> 300줄) - useSpaceWorkspaceSelection 훅을 기능별(영속성, 진단 등) 소형 훅으로 분리 - SpaceToolsDockWidget의 상태 및 핸들러 로직 추출 - 거대 i18n 번역 파일(ko.ts)을 도메인별 메시지 파일로 구조화 - AdminConsoleWidget 누락분 추가 및 미디어 엔티티 타입 오류 수정
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import type { ReactNode } from "react";
|
||||
import Cookies from "js-cookie";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { TOKEN_COOKIE_KEY } from "@/features/auth/model/constants";
|
||||
import { TOKEN_COOKIE_KEY } from "@/shared/config/authTokens";
|
||||
import { Button, type ButtonSize, type ButtonVariant } from "@/shared/ui/Button";
|
||||
import { useAuthStore } from "@/store/useAuthStore";
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
import { apiClient } from '@/shared/lib/apiClient';
|
||||
|
||||
export interface InboxThoughtResponse {
|
||||
id: string;
|
||||
text: string;
|
||||
sceneName: string;
|
||||
isCompleted: boolean;
|
||||
capturedAt: string;
|
||||
}
|
||||
|
||||
export interface CreateInboxThoughtRequest {
|
||||
text: string;
|
||||
sceneName: string;
|
||||
}
|
||||
|
||||
export interface UpdateInboxThoughtRequest {
|
||||
isCompleted: boolean;
|
||||
}
|
||||
|
||||
export const inboxApi = {
|
||||
getThoughts: async (): Promise<InboxThoughtResponse[]> => {
|
||||
return apiClient<InboxThoughtResponse[]>('api/v1/inbox/thoughts', {
|
||||
method: 'GET',
|
||||
});
|
||||
},
|
||||
|
||||
addThought: async (payload: CreateInboxThoughtRequest): Promise<InboxThoughtResponse> => {
|
||||
return apiClient<InboxThoughtResponse>('api/v1/inbox/thoughts', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
},
|
||||
|
||||
updateThoughtComplete: async (
|
||||
thoughtId: string,
|
||||
payload: UpdateInboxThoughtRequest
|
||||
): Promise<InboxThoughtResponse> => {
|
||||
return apiClient<InboxThoughtResponse>(`api/v1/inbox/thoughts/${thoughtId}/complete`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
},
|
||||
|
||||
deleteThought: async (thoughtId: string): Promise<void> => {
|
||||
return apiClient<void>(`api/v1/inbox/thoughts/${thoughtId}`, {
|
||||
method: 'DELETE',
|
||||
expectNoContent: true,
|
||||
});
|
||||
},
|
||||
|
||||
clearThoughts: async (): Promise<void> => {
|
||||
return apiClient<void>('api/v1/inbox/thoughts', {
|
||||
method: 'DELETE',
|
||||
expectNoContent: true,
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user