mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
made transitional Anchor component for next/cra
This commit is contained in:
parent
8bac6bb2f7
commit
7658068caa
12 changed files with 57 additions and 28 deletions
|
@ -4,9 +4,9 @@ import styles from './styles.module.scss';
|
|||
import { URLS } from '~/constants/urls';
|
||||
import { NodeRelatedItem } from '~/components/node/NodeRelatedItem';
|
||||
import { getPrettyDate } from '~/utils/dom';
|
||||
import { Link } from 'react-router-dom';
|
||||
import classNames from 'classnames';
|
||||
import { Icon } from '~/components/input/Icon';
|
||||
import { Anchor } from '~/components/common/Anchor';
|
||||
|
||||
interface IProps {
|
||||
node: Partial<INode>;
|
||||
|
@ -15,7 +15,7 @@ interface IProps {
|
|||
|
||||
const FlowRecentItem: FC<IProps> = ({ node, has_new }) => {
|
||||
return (
|
||||
<Link key={node.id} className={styles.item} to={URLS.NODE_URL(node.id)}>
|
||||
<Anchor key={node.id} className={styles.item} href={URLS.NODE_URL(node.id)}>
|
||||
<div
|
||||
className={classNames(styles.thumb, {
|
||||
[styles.new]: has_new,
|
||||
|
@ -33,7 +33,7 @@ const FlowRecentItem: FC<IProps> = ({ node, has_new }) => {
|
|||
<span>{getPrettyDate(node.created_at)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
</Anchor>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue