mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fix navigation from tag sidebar
This commit is contained in:
parent
5fe6d8b869
commit
afc04abfd4
2 changed files with 5 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
import React, { FC, MouseEventHandler } from 'react';
|
import React, { FC } from 'react';
|
||||||
|
|
||||||
import { FlowRecentItem } from '~/components/flow/FlowRecentItem';
|
import { FlowRecentItem } from '~/components/flow/FlowRecentItem';
|
||||||
import { INode } from '~/types';
|
import { INode } from '~/types';
|
||||||
|
@ -7,13 +7,12 @@ import styles from './styles.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
nodes: INode[];
|
nodes: INode[];
|
||||||
onClick?: MouseEventHandler;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const TagSidebarList: FC<IProps> = ({ nodes, onClick }) => (
|
const TagSidebarList: FC<IProps> = ({ nodes }) => (
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
{nodes.map(node => (
|
{nodes.map((node) => (
|
||||||
<FlowRecentItem node={node} key={node.id} onClick={onClick} />
|
<FlowRecentItem node={node} key={node.id} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -47,7 +47,7 @@ const TagSidebar: VFC<TagSidebarProps> = ({ tag, onRequestClose }) => {
|
||||||
loadMore={loadMore}
|
loadMore={loadMore}
|
||||||
className={styles.list}
|
className={styles.list}
|
||||||
>
|
>
|
||||||
<TagSidebarList nodes={nodes} onClick={onRequestClose} />
|
<TagSidebarList nodes={nodes} />
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue