|
@@ -1,4 +1,5 @@
|
|
|
import React, { FC } from 'react';
|
|
import React, { FC } from 'react';
|
|
|
|
|
+import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
|
|
type SearchResultMeta = {
|
|
type SearchResultMeta = {
|
|
|
took : number,
|
|
took : number,
|
|
@@ -15,7 +16,11 @@ type Props = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const SearchPageLayout: FC<Props> = (props: Props) => {
|
|
const SearchPageLayout: FC<Props> = (props: Props) => {
|
|
|
- const { SearchResultList, SearchControl, SearchResultContent } = props;
|
|
|
|
|
|
|
+ const { t } = useTranslation('');
|
|
|
|
|
+ const {
|
|
|
|
|
+ SearchResultList, SearchControl, SearchResultContent, searchResultMeta, searchingKeyword,
|
|
|
|
|
+ } = 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">
|
|
@@ -24,7 +29,10 @@ const SearchPageLayout: FC<Props> = (props: Props) => {
|
|
|
<nav><SearchControl></SearchControl></nav>
|
|
<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}"
|
|
|
|
|
|
|
+ <span className="font-weight-light">{t('search_result.result_meta')} </span>
|
|
|
|
|
+ <span className="h5">{`"${searchingKeyword}"`}</span>
|
|
|
|
|
+ {/* Todo: replace "1-10" to the appropriate value */}
|
|
|
|
|
+ <span className="ml-3">1-10 / {searchResultMeta.total || 0}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|