@@ -31,6 +31,29 @@ const ProjectDetail = () => {
3131 }
3232 } , [ data , handleModalOpen , isLoading , isFetching ] ) ;
3333
34+ // 간단한 메타 정보 설정
35+ useEffect ( ( ) => {
36+ if ( data ) {
37+ document . title = `${ data . title } - 프로젝트 상세` ;
38+
39+ // 메타 설명 추가
40+ const metaDescription = document . querySelector (
41+ 'meta[name="description"]'
42+ ) ;
43+ if ( metaDescription ) {
44+ metaDescription . setAttribute (
45+ 'content' ,
46+ `${ data . title } 프로젝트에 대한 상세 정보입니다.`
47+ ) ;
48+ } else {
49+ const newMetaDescription = document . createElement ( 'meta' ) ;
50+ newMetaDescription . name = 'description' ;
51+ newMetaDescription . content = `${ data . title } 프로젝트에 대한 상세 정보입니다.` ;
52+ document . head . appendChild ( newMetaDescription ) ;
53+ }
54+ }
55+ } , [ data ] ) ;
56+
3457 if ( isLoading || isFetching ) return < LoadingSpinner /> ;
3558
3659 if ( ! data ) {
@@ -63,27 +86,33 @@ const ProjectDetail = () => {
6386 < S . Title > { data . title } </ S . Title >
6487 < S . ProfileContainer >
6588 < S . ProfileImageContainer onClick = { handleMovetoUserPage } >
66- < Avatar size = '2.5rem' image = { data . user . img } />
89+ < Avatar
90+ size = '2.5rem'
91+ image = { data . user . img }
92+ alt = { `${ data . user . nickname } 의 프로필 이미지` }
93+ />
6794 </ S . ProfileImageContainer >
6895 < S . UserInfo >
6996 < S . UserName onClick = { handleMovetoUserPage } >
7097 { data . user . nickname }
7198 </ S . UserName >
7299 < S . PostDate > { formatDate ( data . recruitmentEndDate ) } </ S . PostDate >
73100 < S . ViewCount >
74- < EyeIcon />
101+ < EyeIcon aria-label = '조회수' />
75102 { data . views }
76103 </ S . ViewCount >
77104 </ S . UserInfo >
78105 </ S . ProfileContainer >
79106 </ S . Header >
107+
80108 < S . Content >
81109 < ProjectInformation data = { data } />
82- < br > </ br >
110+ < br / >
83111 < S . ProjectDescription >
84112 < MarkdownEditorView description = { data . description } />
85113 </ S . ProjectDescription >
86114 </ S . Content >
115+
87116 < S . ApplyButtonContainer >
88117 { userData &&
89118 userData . id !== data . user . id &&
@@ -99,14 +128,17 @@ const ProjectDetail = () => {
99128 </ Button >
100129 ) : null }
101130 </ S . ApplyButtonContainer >
102- < hr > </ hr >
131+
132+ < hr />
133+
103134 < CommentLayout
104135 projectId = { data . id }
105136 createrId = { data . user . id }
106137 loginUserId = { userData ?. id }
107138 />
108139 </ S . Wrapper >
109140 </ S . Container >
141+
110142 < Modal
111143 isOpen = { isOpen }
112144 onClose = { handleModalClose }
0 commit comments