summaryrefslogtreecommitdiff
path: root/components/vendor-data/sidebar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/vendor-data/sidebar.tsx')
-rw-r--r--components/vendor-data/sidebar.tsx15
1 files changed, 5 insertions, 10 deletions
diff --git a/components/vendor-data/sidebar.tsx b/components/vendor-data/sidebar.tsx
index 3805d216..a6b35a9d 100644
--- a/components/vendor-data/sidebar.tsx
+++ b/components/vendor-data/sidebar.tsx
@@ -27,8 +27,7 @@ interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
selectedProjectId: number | null
selectedContractId: number | null
onSelectPackage: (itemId: number) => void
- forms: FormInfo[]
- selectedForm: string | null
+ forms?: FormInfo[] // 선택적 속성으로 변경
onSelectForm: (formName: string) => void
isLoadingForms?: boolean
mode: "IM" | "ENG" // 새로 추가: 현재 선택된 모드
@@ -43,7 +42,7 @@ export function Sidebar({
selectedContractId,
onSelectPackage,
forms,
- selectedForm,
+ // selectedForm, // 사용되지 않음
onSelectForm,
isLoadingForms = false,
mode = "IM", // 기본값 설정
@@ -90,13 +89,9 @@ export function Sidebar({
* ---------------------------
*/
const handlePackageClick = (itemId: number) => {
- // 상위 컴포넌트 상태 업데이트
+ // 상위 컴포넌트 상태 업데이트만 수행
+ // 라우팅은 하지 않음 (프로젝트 선택 상태 유지)
onSelectPackage(itemId)
-
- // 해당 태그 페이지로 라우팅
- // 예: /vendor-data/tag/123
- const baseSegments = segments.slice(0, segments.indexOf("vendor-data") + 1).join("/")
- router.push(`/${baseSegments}/tag/${itemId}`)
}
/**
@@ -204,7 +199,7 @@ export function Sidebar({
<Skeleton className="h-8 w-full" />
</div>
))
- ) : forms.length === 0 ? (
+ ) : !forms || forms.length === 0 ? (
<p className="text-sm text-muted-foreground px-2">
(No forms loaded)
</p>