Sprint 001 non-blocking 해결: - N6: npm audit high 패키지 업데이트 (@nestjs/config, @nestjs/cli) - S1: CORS origin 화이트리스트 (CORS_ORIGINS env) - S3: DATABASE_URL 미설정 시 즉시 throw - N2: SSH_KEY_PATH 미설정 시 즉시 throw (하드코딩 fallback 제거) - N3: API 응답에서 내부 IP 제거 - N7: SshService 에러 메시지 마스킹 (IP 노출 차단) - N4: theme.ts 색상 SisterCard/StatusBadge에 실제 적용 - N5: Sidebar-MainContent margin 연동 (SidebarContext) - N9: LayoutShell Client 컴포넌트로 분리 Sprint 002 본문: - TASK-004: GiteaService (org repo 목록, PR 조회) - TASK-004: GET /api/projects → Gitea + DB 병합 - TASK-004: GET /api/projects/:id → 상세 + open PRs - TASK-005: GET /api/projects/:id/tasks → Sprint/Task Ledger - TASK-005: POST /api/projects/:id/sprints → Sprint 생성 - TASK-005: PATCH /api/tasks/:id → Task 상태 업데이트 + ActivityLog - TASK-006: GET /api/activity, /api/projects/:id/activity - TASK-007: /projects/[id] 상세 페이지 (SprintAccordion + TaskTable + 활동탭) - TASK-007: 메인 대시보드에 프로젝트 섹션 + 활동 피드 추가 - 테스트 11/11 pass
27 lines
625 B
TypeScript
27 lines
625 B
TypeScript
'use client';
|
|
|
|
import React, { createContext, useContext, useState } from 'react';
|
|
|
|
interface SidebarContextValue {
|
|
collapsed: boolean;
|
|
setCollapsed: (v: boolean) => void;
|
|
}
|
|
|
|
const SidebarContext = createContext<SidebarContextValue>({
|
|
collapsed: false,
|
|
setCollapsed: () => {},
|
|
});
|
|
|
|
export function SidebarProvider({ children }: { children: React.ReactNode }) {
|
|
const [collapsed, setCollapsed] = useState(false);
|
|
return (
|
|
<SidebarContext.Provider value={{ collapsed, setCollapsed }}>
|
|
{children}
|
|
</SidebarContext.Provider>
|
|
);
|
|
}
|
|
|
|
export function useSidebar() {
|
|
return useContext(SidebarContext);
|
|
}
|