- {linkProviders.map((provider) => {
- const Icon = provider.icon;
+ {RESOURCE_LINK_PROVIDERS.map((provider) => {
+ const Icon = provider === 'github' ? GitBranch : Link;
return (
);
})}
diff --git a/src/features/manage-resources/ui/ResourceList.tsx b/src/features/manage-resources/ui/ResourceList.tsx
index fcf0e30..896b85a 100644
--- a/src/features/manage-resources/ui/ResourceList.tsx
+++ b/src/features/manage-resources/ui/ResourceList.tsx
@@ -1,9 +1,13 @@
'use client';
// 자료실의 파일과 링크 자료를 카드 목록으로 렌더링합니다.
-import { Archive, ChevronRight, GitBranch, Link, MoreHorizontal } from 'lucide-react';
+import { Archive, ChevronRight, Download, GitBranch, Link, MoreHorizontal } from 'lucide-react';
import { useState } from 'react';
-import type { ResourceItem, ResourceViewer } from '@/entities/resource';
+import {
+ RESOURCE_LINK_PROVIDER_LABEL,
+ type ResourceItem,
+ type ResourceViewer,
+} from '@/entities/resource';
import { cn } from '@/shared/lib/utils';
interface ResourceListProps {
@@ -46,11 +50,30 @@ export function ResourceList({
}: ResourceListProps) {
const [openMenuResourceId, setOpenMenuResourceId] = useState
(null);
+ if (resources.length === 0) {
+ return (
+
+
+
+
+
아직 등록된 자료가 없습니다.
+
+ 파일을 업로드하거나 필요한 링크를 저장해보세요.
+
+
+ );
+ }
+
return (
{resources.map((resource) => {
const Icon = getResourceIcon(resource);
- const typeLabel = resource.resourceType === 'file' ? '파일' : '링크';
+ const typeLabel =
+ resource.resourceType === 'file'
+ ? '파일'
+ : RESOURCE_LINK_PROVIDER_LABEL[resource.linkProvider ?? 'link'];
+ // 파일은 다운로드, 링크는 외부 페이지 이동이라는 서로 다른 동작을 아이콘으로 구분합니다.
+ const ActionIcon = resource.resourceType === 'file' ? Download : ChevronRight;
const isMenuOpen = openMenuResourceId === resource.id;
const canManage =
viewer?.role === 'owner' || (viewer?.userId && viewer.userId === resource.uploadedById);
@@ -84,7 +107,7 @@ export function ResourceList({
- {resource.description || resource.url || resource.fileName}
+ {resource.description || resource.url}
{resource.uploadedBy} · {resource.createdAt}
@@ -105,11 +128,11 @@ export function ResourceList({
) : null}
{isMenuOpen ? (
diff --git a/src/features/workspace-notifications/ui/NotificationPanel.tsx b/src/features/workspace-notifications/ui/NotificationPanel.tsx
index 0334a9b..5de48ae 100644
--- a/src/features/workspace-notifications/ui/NotificationPanel.tsx
+++ b/src/features/workspace-notifications/ui/NotificationPanel.tsx
@@ -76,7 +76,13 @@ export function NotificationPanel({
알림
-
최근 알림 10개
+
+ {isLoading
+ ? '알림을 불러오는 중입니다.'
+ : notifications.length === 0
+ ? '새 알림이 없습니다.'
+ : `최근 알림 ${notifications.length}개`}
+
+ onOpenChange(false)}
+ className="block border-t border-slate-100 px-4 py-3 text-center text-sm font-bold text-indigo-600 hover:bg-indigo-50"
+ >
+ 전체 알림 보기
+
)}