1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

using lab icon on recent posts

This commit is contained in:
Fedor Katurov 2022-10-17 11:27:54 +06:00
parent 0dfc334274
commit dfcf0a541d
3 changed files with 49 additions and 13 deletions

View file

@ -11,7 +11,6 @@ import { getPrettyDate } from '~/utils/dom';
import styles from './styles.module.scss';
interface IProps {
node: Partial<INode>;
has_new?: boolean;
@ -20,7 +19,12 @@ interface IProps {
const FlowRecentItem: FC<IProps> = ({ node, has_new, onClick }) => {
return (
<Anchor key={node.id} className={styles.item} href={URLS.NODE_URL(node.id)} onClick={onClick}>
<Anchor
key={node.id}
className={styles.item}
href={URLS.NODE_URL(node.id)}
onClick={onClick}
>
<div
className={classNames(styles.thumb, {
[styles.new]: has_new,
@ -34,7 +38,6 @@ const FlowRecentItem: FC<IProps> = ({ node, has_new, onClick }) => {
<div className={styles.title}>{node.title || '...'}</div>
<div className={styles.comment}>
{!node.is_promoted && <Icon icon="lab" size={14} />}
<span>{getPrettyDate(node.created_at)}</span>
</div>
</div>