@@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
3
3
import useDropdown from "../../hooks/common/dropdown/useDropdown" ;
4
4
import { ProjectCard } from "." ;
5
5
import { PROJECT_SORT_OPTION } from "../../constants/projects" ;
6
- import plus from "../../assets/icons/plus.svg" ;
6
+ import Plus from "../../assets/icons/plus.svg?react " ;
7
7
import { ProjectDTO } from "../../types/DTO/projectDTO" ;
8
8
import projectSortByOption from "../../utils/projectSortByOption" ;
9
9
import { useGetProjects } from "../../hooks/queries/project" ;
@@ -59,17 +59,24 @@ const ProjectList = () => {
59
59
className = "flex items-center justify-center w-[10.45rem] h-[2.5rem] py-2 pl-3 pr-9 text-white text-xs bg-middle-green gap-3 rounded-[0.375rem] shadow-box"
60
60
onClick = { handleCreateButtonClick }
61
61
>
62
- < img src = { plus } alt = "더하기" className = "w-7 " />
62
+ < Plus width = { 32 } height = { 32 } stroke = "white " />
63
63
추가하기
64
64
</ button >
65
65
</ div >
66
66
</ div >
67
67
< div className = "flex flex-wrap gap-10 w-[720px] max-h-[37.25rem] overflow-y-auto scrollbar-hide" >
68
- { projectList . map ( ( project : ProjectDTO ) => (
69
- < Link key = { project . id } to = { `${ ROUTER_URL . PROJECTS } /${ project . id } ` } >
70
- < ProjectCard project = { project } />
71
- </ Link >
72
- ) ) }
68
+ { projectList . length ? (
69
+ projectList . map ( ( project : ProjectDTO ) => (
70
+ < Link key = { project . id } to = { `${ ROUTER_URL . PROJECTS } /${ project . id } ` } >
71
+ < ProjectCard project = { project } />
72
+ </ Link >
73
+ ) )
74
+ ) : (
75
+ < div className = "flex flex-col items-center w-full gap-1 py-6 text-xs bg-gray-100 rounded-md" >
76
+ < p > 진행 중인 프로젝트가 없습니다.</ p >
77
+ < p > 프로젝트를 추가해주세요.</ p >
78
+ </ div >
79
+ ) }
73
80
</ div >
74
81
</ section >
75
82
) ;
0 commit comments