99 mdiShare ,
1010 mdiStar ,
1111 mdiStarOutline ,
12- mdiUpload
12+ mdiUpload ,
1313} from "@mdi/js" ;
1414import Icon from "@mdi/react" ;
1515import {
@@ -18,20 +18,22 @@ import {
1818 Divider ,
1919 IconButton ,
2020 ListItemIcon ,
21- Skeleton ,
2221 Menu ,
2322 MenuItem ,
23+ Skeleton ,
2424 Stack ,
25- Tooltip
25+ Tooltip ,
2626} from "@mui/material" ;
2727import { push } from "connected-react-router" ;
2828import R from "ramda" ;
2929import React , { useEffect , useState } from "react" ;
3030import { store as RNC } from "react-notifications-component" ;
3131import { useDispatch , useSelector } from "react-redux" ;
3232import { useParams } from "react-router" ;
33+ import { Link } from "react-router-dom" ;
3334import LinkComponent from "_atoms/LinkComponent" ;
3435import TypeIcon from "_atoms/TypeIcon" ;
36+ import { dateElapsed , dateToString } from "_frontend/utils/date" ;
3537import BreadCrumbs from "_molecules/BreadCrumbs" ;
3638import Editor from "_molecules/Editor" ;
3739import Comment from "_organisms/Comment" ;
@@ -40,12 +42,12 @@ import {
4042 attemptDeleteItem ,
4143 attemptGetItem ,
4244 attemptGetItemChildren ,
43- attemptPublishItem
45+ attemptPublishItem ,
4446} from "_thunks/item" ;
4547import {
4648 attemptAddBookmark ,
4749 attemptGetUser ,
48- attemptRemoveBookmark
50+ attemptRemoveBookmark ,
4951} from "_thunks/user" ;
5052import { deepEqual } from "_utils/compare" ;
5153
@@ -331,7 +333,9 @@ export default function ItemPage() {
331333 < TypeIcon type = { item . type } size = { 1.5 } opacity = { 0.7 } />
332334 </ Badge >
333335 </ Tooltip >
336+ { /* Item title */ }
334337 < div className = "item-title" > { item . title } </ div >
338+ { /* Item action menus */ }
335339 < Stack direction = "row" >
336340 < Tooltip title = "북마크에 추가" arrow >
337341 < IconButton onClick = { toggleBookmark } >
@@ -346,26 +350,35 @@ export default function ItemPage() {
346350 </ IconButton >
347351 </ Stack >
348352 </ div >
349- { itemParents != null ? (
350- < BreadCrumbs itemArray = { [ ...itemParents , item ] } />
351- ) : (
352- < BreadCrumbs hierarchyLevel = { hierarchyLevel [ item . type ] } />
353- ) }
354353 </ Stack >
354+ { /* Item BreadCrumbs */ }
355+ { itemParents != null ? (
356+ < BreadCrumbs itemArray = { [ ...itemParents , item ] } />
357+ ) : (
358+ < BreadCrumbs hierarchyLevel = { hierarchyLevel [ item . type ] } />
359+ ) }
360+ { /* Item owner profile */ }
355361 { itemOwner != null ? (
356362 < Stack className = "item-profile" >
357363 < img
358364 className = "item-profile-image"
359365 src = { itemOwner . profileImageUrl || "/images/default-profile.png" }
360366 />
361367 < div className = "item-profile-name" >
362- { itemOwner . rank } { itemOwner . name }
368+ < Link to = { `/user/${ itemOwner . _id } ` } >
369+ { itemOwner . rank } { itemOwner . name }
370+ </ Link >
371+ { "님이" }
372+ < Tooltip title = { dateToString ( item . created ) } arrow >
373+ < div > { dateElapsed ( item . created ) } </ div >
374+ </ Tooltip >
375+ { "작성함" }
363376 </ div >
364377 </ Stack >
365378 ) : (
366379 < Stack className = "item-profile" >
367- < Skeleton className = "item-profile-image" />
368- < Skeleton className = "item-profile-name " />
380+ < Skeleton variant = "circular" width = { 24 } height = { 24 } />
381+ < Skeleton width = { 200 } height = "1em " />
369382 </ Stack >
370383 ) }
371384 { item . content && < Editor content = { item . content } editable = { false } /> }
0 commit comments