mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-07-18 07:18:36 +07:00
search load more
This commit is contained in:
parent
94ac596b92
commit
9498c7b7a0
12 changed files with 199 additions and 26 deletions
|
@ -13,9 +13,10 @@ interface IProps {
|
|||
updated: IFlowState['updated'];
|
||||
search: IFlowState['search'];
|
||||
flowChangeSearch: typeof FLOW_ACTIONS.flowChangeSearch;
|
||||
onLoadMore: () => void;
|
||||
}
|
||||
|
||||
const FlowStamp: FC<IProps> = ({ recent, updated, search, flowChangeSearch }) => {
|
||||
const FlowStamp: FC<IProps> = ({ recent, updated, search, flowChangeSearch, onLoadMore }) => {
|
||||
const onSearchChange = useCallback((text: string) => flowChangeSearch({ text }), [
|
||||
flowChangeSearch,
|
||||
]);
|
||||
|
@ -35,16 +36,19 @@ const FlowStamp: FC<IProps> = ({ recent, updated, search, flowChangeSearch }) =>
|
|||
<>
|
||||
<div className={styles.label}>
|
||||
<span className={styles.label_text}>Результаты поиска</span>
|
||||
<span className="line" />
|
||||
<span>{!search.is_loading && search.total}</span>
|
||||
</div>
|
||||
|
||||
<div className={styles.items}>
|
||||
<FlowSearchResults search={search} />
|
||||
<FlowSearchResults search={search} onLoadMore={onLoadMore} />
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div className={styles.label}>
|
||||
<span className={styles.label_text}>Что нового?</span>
|
||||
<span className="line" />
|
||||
</div>
|
||||
|
||||
<div className={styles.items}>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
flex-direction: column;
|
||||
flex: 1;
|
||||
border-radius: $radius;
|
||||
overflow: hidden;
|
||||
|
||||
@include outer_shadow();
|
||||
}
|
||||
|
@ -21,6 +22,7 @@
|
|||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.label {
|
||||
|
@ -38,6 +40,10 @@
|
|||
color: white;
|
||||
padding-left: $gap * 1.2;
|
||||
}
|
||||
|
||||
& > :global(.line) {
|
||||
margin-right: $gap;
|
||||
}
|
||||
}
|
||||
|
||||
.label_text {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue