Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/entities/workspace/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 목업 워크스페이스 데이터와 타입의 공개 API입니다.
export type { Workspace } from './model/workspace.types';
export type { Workspace, WorkspacePurpose } from './model/workspace.types';
export { mockWorkspace } from './model/mock-workspace';
4 changes: 3 additions & 1 deletion src/entities/workspace/model/workspace.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Supabase 워크스페이스 데이터 연결 전 shell에서 사용하는 워크스페이스 타입입니다.
export type WorkspacePurpose = 'team-project' | 'side-project' | 'store-operation';

export interface Workspace {
id: string;
name: string;
purpose: 'store-operation' | 'team-project' | 'side-project';
purpose: WorkspacePurpose;
}
7 changes: 7 additions & 0 deletions src/widgets/workspace-shell/lib/get-workspace-navigation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// 워크스페이스 목적에 맞는 shell navigation 항목을 반환합니다.
import type { WorkspacePurpose } from '@/entities/workspace';
import { workspaceNavigationByPurpose } from '@/widgets/workspace-shell/model/workspace-navigation';

export function getWorkspaceNavigation(purpose: WorkspacePurpose) {
return workspaceNavigationByPurpose[purpose];
}
52 changes: 31 additions & 21 deletions src/widgets/workspace-shell/model/workspace-navigation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// 워크스페이스 목적별 사이드바 메뉴 항목을 정의합니다.
import type { WorkspacePurpose } from '@/entities/workspace';
import {
Bell,
Calendar,
Expand All @@ -7,6 +8,9 @@ import {
LayoutDashboard,
MessageSquare,
Settings,
Rocket,
FileText,
BarChart3,
type LucideIcon,
} from 'lucide-react';

Expand All @@ -27,26 +31,32 @@ export const storeOperationNavigationItems: WorkspaceNavigationItem[] = [
];

// TODO: 사이드 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];

// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
Comment on lines +34 to +56

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

sideProjectNavigationItemsteamProjectNavigationItems의 항목 중복.

두 배열은 대시보드/캘린더/회의록/자료실/채팅/진행률 차트/설정 7개 항목이 동일하고, 스프린트보드↔프로젝트관리 라벨 및 공지 유무만 다릅니다. 공통 항목을 추출하면 향후 두 배열이 따로 갱신되며 어긋나는 것을 방지할 수 있습니다.

♻️ 공통 항목 추출 예시
+const commonProjectNavigationItems: WorkspaceNavigationItem[] = [
+  { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
+  { label: '캘린더', href: 'calendar', icon: Calendar },
+  { label: '회의록', href: 'meeting-notes', icon: FileText },
+  { label: '자료실', href: 'files', icon: FileBox },
+  { label: '채팅', href: 'chat', icon: MessageSquare },
+  { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
+  { label: '설정', href: 'settings', icon: Settings },
+];
+
 export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
-  { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
+  commonProjectNavigationItems[0],
   { label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
-  { label: '캘린더', href: 'calendar', icon: Calendar },
-  { label: '회의록', href: 'meeting-notes', icon: FileText },
-  { label: '자료실', href: 'files', icon: FileBox },
-  { label: '채팅', href: 'chat', icon: MessageSquare },
-  { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
-  { label: '설정', href: 'settings', icon: Settings },
+  ...commonProjectNavigationItems.slice(1),
 ];

 export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
-  { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
+  commonProjectNavigationItems[0],
   { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
-  { label: '캘린더', href: 'calendar', icon: Calendar },
+  commonProjectNavigationItems[1],
   { label: '공지', href: 'notices', icon: Bell },
-  { label: '회의록', href: 'meeting-notes', icon: FileText },
-  { label: '자료실', href: 'files', icon: FileBox },
-  { label: '채팅', href: 'chat', icon: MessageSquare },
-  { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
-  { label: '설정', href: 'settings', icon: Settings },
+  ...commonProjectNavigationItems.slice(2),
 ];
📝 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
export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
const commonProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
commonProjectNavigationItems[0],
{ label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
...commonProjectNavigationItems.slice(1),
];
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
commonProjectNavigationItems[0],
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
commonProjectNavigationItems[1],
{ label: '공지', href: 'notices', icon: Bell },
...commonProjectNavigationItems.slice(2),
];
🤖 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/widgets/workspace-shell/model/workspace-navigation.ts` around lines 34 -
56, The navigation definitions in workspace-navigation.ts duplicate most items
between sideProjectNavigationItems and teamProjectNavigationItems, so extract
the shared entries into a common base and build each list by composing or
extending it. Keep the unique differences localized in the two arrays: the
sprint-board label change, the notices item in teamProjectNavigationItems, and
any purpose-specific ordering or overrides. Use the existing
WorkspaceNavigationItem arrays and their item labels/hrefs/icons to locate and
refactor the shared navigation setup.

Comment on lines 45 to +56

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

TODO 주석이 이미 구현된 내용과 모순됩니다.

teamProjectNavigationItems 위의 TODO는 "팀 프로젝트 도메인을 만들 때 별도 purpose 전용 사이드바로 연결"하라고 되어 있지만, 바로 아래 workspaceNavigationByPurpose(라인 58-62)에서 이미 'team-project' purpose에 연결이 완료되어 있습니다. 이 상태로 두면 향후 팀원이 "아직 연결 안 됨"으로 오해할 수 있습니다.

📝 제안
-// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
+// team-project purpose 전용 navigation. 세부 페이지(예: 프로젝트 관리) 도메인이 추가되면 href/아이콘을 갱신하세요.
 export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
📝 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
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
// team-project purpose 전용 navigation. 세부 페이지(예: 프로젝트 관리) 도메인이 추가되면 href/아이콘을 갱신하세요.
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
🤖 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/widgets/workspace-shell/model/workspace-navigation.ts` around lines 45 -
56, The TODO above teamProjectNavigationItems is stale because
workspaceNavigationByPurpose already routes the 'team-project' purpose to this
navigation list. Update the comment to match the current implementation or
remove it entirely, and make sure the intent is clear in
workspaceNavigationByPurpose and teamProjectNavigationItems so future readers do
not think the sidebar hookup is still pending.


export const workspaceNavigationByPurpose = {
'store-operation': storeOperationNavigationItems,
'team-project': teamProjectNavigationItems,
'side-project': sideProjectNavigationItems,
} satisfies Record<WorkspacePurpose, WorkspaceNavigationItem[]>;
Comment on lines +58 to +62

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial

navigation 설정 위치는 현재로선 적절해 보입니다.

model(데이터)과 lib(조회 유틸)를 workspace-shell 위젯 하위로 분리한 구조는 현재 이 데이터가 해당 위젯에서만 소비된다는 점에서 타당합니다. satisfies Record<WorkspacePurpose, WorkspaceNavigationItem[]>로 purpose 누락을 컴파일 타임에 방지한 점도 좋습니다. 다만 향후 세부 페이지(예: sprint-board, notices)가 각자 자신의 navigation 메타데이터를 알아야 하는 시점이 오면, 이 매핑을 entities/workspace 등 더 상위 레이어로 승격하는 것을 고려하세요.

🤖 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/widgets/workspace-shell/model/workspace-navigation.ts` around lines 58 -
62, The current workspaceNavigationByPurpose mapping is fine for widget-local
use, but if sprint-board or notices need their own navigation metadata, relocate
this purpose-to-items map out of workspace-shell/model into a shared workspace
layer such as entities/workspace and keep the lookup in the
workspaceNavigationByPurpose symbol or a dedicated lib helper so page-specific
consumers can access it without depending on widget internals.

18 changes: 10 additions & 8 deletions src/widgets/workspace-shell/ui/WorkspaceHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
import { Bell, Search, UserRoundPlus } from 'lucide-react';
import { usePathname } from 'next/navigation';
import { mockCurrentWorkspaceMember } from '@/entities/workspace-member';
import { storeOperationNavigationItems } from '../model/workspace-navigation';
import type { WorkspaceNavigationItem } from '../model/workspace-navigation';

function getCurrentPageTitle(pathname: string): string {
const currentNavigationItem = storeOperationNavigationItems.find((item) =>
pathname.endsWith(`/${item.href}`),
);
interface WorkspaceHeaderProps {
navigationItems: WorkspaceNavigationItem[];
}

function getCurrentPageTitle(pathname: string, navigationItems: WorkspaceNavigationItem[]): string {
const currentNavigationItem = navigationItems.find((item) => pathname.endsWith(`/${item.href}`));

return currentNavigationItem?.label ?? '대시보드';
}

export function WorkspaceHeader() {
export function WorkspaceHeader({ navigationItems }: WorkspaceHeaderProps) {
const pathname = usePathname();
const title = getCurrentPageTitle(pathname);
const title = getCurrentPageTitle(pathname, navigationItems);

return (
<header className="flex h-[72px] items-center justify-between border-b border-slate-200 bg-white px-8">
Expand Down Expand Up @@ -46,7 +48,7 @@ export function WorkspaceHeader() {
className="relative flex h-10 w-10 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100"
>
<Bell className="h-5 w-5" aria-hidden="true" />
<span className="absolute right-2 top-2 h-2 w-2 rounded-full bg-rose-500" />
<span className="absolute top-2 right-2 h-2 w-2 rounded-full bg-rose-500" />
</button>

<div className="flex h-10 w-10 items-center justify-center rounded-full bg-orange-400 text-sm font-bold text-white">
Expand Down
8 changes: 7 additions & 1 deletion src/widgets/workspace-shell/ui/WorkspaceShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import { useState } from 'react';
import { WorkspaceHeader } from './WorkspaceHeader';
import { WorkspaceSidebar } from './WorkspaceSidebar';
import { mockWorkspace } from '@/entities/workspace';
import { getWorkspaceNavigation } from '@/widgets/workspace-shell/lib/get-workspace-navigation';

interface WorkspaceShellProps {
workspaceId: string;
Expand All @@ -12,17 +14,21 @@ interface WorkspaceShellProps {

export function WorkspaceShell({ workspaceId, children }: WorkspaceShellProps) {
const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);
const workspace = mockWorkspace; // 나중에는 workspaceId로 Supabase 조회
const navigationItems = getWorkspaceNavigation(workspace.purpose);
Comment on lines +17 to +18

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

향후 Supabase 교체를 대비해 workspace 조회를 함수로 캡슐화하는 것을 고려하세요.

현재 mockWorkspace를 컴포넌트 본문에서 직접 참조하고 있습니다. PR 목표상 이후 workspaceId로 Supabase 조회를 붙일 예정이므로, 지금 getWorkspace(workspaceId) 같은 얇은 함수(현재는 mock을 반환)로 감싸두면 실제 조회 로직 교체 시 이 파일의 변경 범위가 최소화됩니다.

♻️ 제안
-  const workspace = mockWorkspace; // 나중에는 workspaceId로 Supabase 조회
+  const workspace = getWorkspace(workspaceId); // 현재는 mock, 추후 Supabase 조회로 교체
// 예: src/entities/workspace/model/get-workspace.ts
export function getWorkspace(workspaceId: string): Workspace {
  // TODO: Supabase 조회로 교체
  return mockWorkspace;
}
🤖 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/widgets/workspace-shell/ui/WorkspaceShell.tsx` around lines 17 - 18, The
workspace lookup in WorkspaceShell should be wrapped behind a dedicated accessor
instead of reading mockWorkspace directly. Introduce a thin
getWorkspace(workspaceId) function and use it in WorkspaceShell when deriving
workspace and navigationItems, so the current mock implementation can later be
replaced with Supabase lookup without changing this component’s logic.


return (
<div className="flex h-screen overflow-hidden bg-[#f7f8fc]">
<WorkspaceSidebar
workspace={workspace}
workspaceId={workspaceId}
isCollapsed={isSidebarCollapsed}
navigationItems={navigationItems}
onToggleCollapsed={() => setIsSidebarCollapsed((current) => !current)}
/>

<div className="flex h-screen min-w-0 flex-1 flex-col">
<WorkspaceHeader />
<WorkspaceHeader navigationItems={navigationItems} />
<main className="min-h-0 flex-1 overflow-y-auto px-8 py-8">{children}</main>
</div>
</div>
Expand Down
18 changes: 12 additions & 6 deletions src/widgets/workspace-shell/ui/WorkspaceSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ import Image from 'next/image';
import Link from 'next/link';
import { ChevronRight, LogOut, Menu, Store } from 'lucide-react';
import { usePathname } from 'next/navigation';
import { mockWorkspace } from '@/entities/workspace';
import type { Workspace } from '@/entities/workspace';
import { mockCurrentWorkspaceMember } from '@/entities/workspace-member';
import { cn } from '@/shared/lib/utils';
import { storeOperationNavigationItems } from '../model/workspace-navigation';
import type { WorkspaceNavigationItem } from '../model/workspace-navigation';

interface WorkspaceSidebarProps {
workspace: Workspace;
workspaceId: string;
isCollapsed: boolean;
navigationItems: WorkspaceNavigationItem[];
onToggleCollapsed: () => void;
}

export function WorkspaceSidebar({
workspace,
workspaceId,
isCollapsed,
navigationItems,
onToggleCollapsed,
}: WorkspaceSidebarProps) {
const pathname = usePathname();
Expand Down Expand Up @@ -50,7 +54,7 @@ export function WorkspaceSidebar({
onClick={onToggleCollapsed}
className={cn(
'flex h-9 w-9 items-center justify-center rounded-lg text-slate-500 hover:bg-slate-100',
isCollapsed && 'absolute left-1/2 top-[84px] -translate-x-1/2',
isCollapsed && 'absolute top-[84px] left-1/2 -translate-x-1/2',
)}
>
<Menu className="h-5 w-5" aria-hidden="true" />
Expand All @@ -69,8 +73,10 @@ export function WorkspaceSidebar({
<span className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-orange-400 text-white">
<Store className="h-4 w-4" aria-hidden="true" />
</span>
<span className={cn('truncate text-sm font-bold text-slate-950', isCollapsed && 'sr-only')}>
{mockWorkspace.name}
<span
className={cn('truncate text-sm font-bold text-slate-950', isCollapsed && 'sr-only')}
>
{workspace.name}
</span>
</span>
{!isCollapsed ? (
Expand All @@ -80,7 +86,7 @@ export function WorkspaceSidebar({
</div>

<nav className="flex-1 space-y-1 px-3 py-4">
{storeOperationNavigationItems.map((item) => {
{navigationItems.map((item) => {
const Icon = item.icon;
const href = `/workspaces/${workspaceId}/${item.href}`;
const isActive = pathname === href;
Expand Down