|
@@ -1,5 +1,4 @@
|
|
|
import React, { FC } from 'react';
|
|
import React, { FC } from 'react';
|
|
|
-import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
type SearchResultMeta = {
|
|
type SearchResultMeta = {
|
|
|
took : number,
|
|
took : number,
|
|
@@ -8,19 +7,20 @@ type SearchResultMeta = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
- SearchControl:JSX.Element,
|
|
|
|
|
- SearchResultList: JSX.Element,
|
|
|
|
|
- SearchResultContent: JSX.Element,
|
|
|
|
|
|
|
+ SearchControl: any,
|
|
|
|
|
+ SearchResultList: any,
|
|
|
|
|
+ SearchResultContent: any,
|
|
|
searchResultMeta: SearchResultMeta,
|
|
searchResultMeta: SearchResultMeta,
|
|
|
searchingKeyword: string
|
|
searchingKeyword: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const SearchPageLayout: FC<Props> = (props: Props) => {
|
|
const SearchPageLayout: FC<Props> = (props: Props) => {
|
|
|
|
|
+ const { SearchResultList, SearchControl, SearchResultContent } = props;
|
|
|
return (
|
|
return (
|
|
|
<div className="content-main">
|
|
<div className="content-main">
|
|
|
<div className="search-result row" id="search-result">
|
|
<div className="search-result row" id="search-result">
|
|
|
- <div className="col-lg-6 d-none d-lg-block page-list search-result-list pr-0" id="search-result-list">
|
|
|
|
|
- <nav>{props.SearchControl}</nav>
|
|
|
|
|
|
|
+ <div className="col-lg-6 page-list search-result-list pr-0" id="search-result-list">
|
|
|
|
|
+ <nav><SearchControl></SearchControl></nav>
|
|
|
<div className="d-flex align-items-start justify-content-between mt-1">
|
|
<div className="d-flex align-items-start justify-content-between mt-1">
|
|
|
<div className="search-result-meta">
|
|
<div className="search-result-meta">
|
|
|
<i className="icon-magnifier" /> Found {props.searchResultMeta.total} pages with "{props.searchingKeyword}"
|
|
<i className="icon-magnifier" /> Found {props.searchResultMeta.total} pages with "{props.searchingKeyword}"
|
|
@@ -28,11 +28,11 @@ const SearchPageLayout: FC<Props> = (props: Props) => {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="page-list">
|
|
<div className="page-list">
|
|
|
- <ul className="page-list-ul page-list-ul-flat nav nav-pills">{props.SearchResultList}</ul>
|
|
|
|
|
|
|
+ <ul className="page-list-ul page-list-ul-flat nav nav-pills"><SearchResultList></SearchResultList></ul>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div className="col-lg-6 search-result-content">
|
|
|
|
|
- {props.SearchResultContent}
|
|
|
|
|
|
|
+ <div className="col-lg-6 d-none d-lg-block search-result-content">
|
|
|
|
|
+ <SearchResultContent></SearchResultContent>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|