mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
added created at to node panel
This commit is contained in:
parent
5b7077d256
commit
8a3b93dcc0
2 changed files with 8 additions and 3 deletions
|
@ -6,6 +6,7 @@ import { Icon } from '~/components/input/Icon';
|
|||
import { INode } from '~/redux/types';
|
||||
import classNames from 'classnames';
|
||||
import { Placeholder } from '~/components/placeholders/Placeholder';
|
||||
import { getPrettyDate } from '~/utils/dom';
|
||||
|
||||
interface IProps {
|
||||
node: Partial<INode>;
|
||||
|
@ -24,7 +25,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
const NodePanelInner: FC<IProps> = ({
|
||||
node: { title, user, is_liked, is_heroic, deleted_at },
|
||||
node: { title, user, is_liked, is_heroic, deleted_at, created_at },
|
||||
stack,
|
||||
|
||||
can_star,
|
||||
|
@ -48,7 +49,11 @@ const NodePanelInner: FC<IProps> = ({
|
|||
</div>
|
||||
{user && user.username && (
|
||||
<div className={styles.name}>
|
||||
{is_loading ? <Placeholder width="100px" /> : `~${user.username}`}
|
||||
{is_loading ? (
|
||||
<Placeholder width="100px" />
|
||||
) : (
|
||||
`~${user.username}, ${getPrettyDate(created_at)}`
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Filler>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue