mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed date on recent items
This commit is contained in:
parent
8a37fa1f1b
commit
fc57a6224b
2 changed files with 3 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
import React, { FC } from 'react';
|
||||
import * as styles from './styles.scss';
|
||||
import { IFlowState } from '~/redux/flow/reducer';
|
||||
import { getURL } from '~/utils/dom';
|
||||
import { getURL, getPrettyDate } from '~/utils/dom';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { URLS } from '~/constants/urls';
|
||||
import classNames from 'classnames';
|
||||
|
@ -23,7 +23,7 @@ const FlowRecent: FC<IProps> = ({ recent, updated }) => (
|
|||
|
||||
<div className={styles.info}>
|
||||
<div className={styles.title}>{node.title}</div>
|
||||
<div className={styles.comment}>{node.created_at}</div>
|
||||
<div className={styles.comment}>{getPrettyDate(node.created_at)}</div>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
|
@ -37,7 +37,7 @@ const FlowRecent: FC<IProps> = ({ recent, updated }) => (
|
|||
/>
|
||||
<div className={styles.info}>
|
||||
<div className={styles.title}>{node.title}</div>
|
||||
<div className={styles.comment}>{node.created_at}</div>
|
||||
<div className={styles.comment}>{getPrettyDate(node.created_at)}</div>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
|
|
|
@ -80,11 +80,6 @@ export const formatText = (text: string): string =>
|
|||
.replace(/:\|--\|/gim, '://')
|
||||
.split('\n')
|
||||
.map(el => `<p>${el}</p>`)
|
||||
// .map((el, index) =>
|
||||
// index === 0
|
||||
// ? `${author ? `<p><b class="comment-author">${author}: </b>` : ''}${el}</p>`
|
||||
// : `<p>${el}</p>`
|
||||
// )
|
||||
.join('');
|
||||
|
||||
export const formatCommentText = (author: string, text: string): string =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue