Browse Source

82578 show nothing when result count is 0

Yohei-Shiina 4 years ago
parent
commit
77faf8c3d7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/app/src/components/SearchPage/SearchPageLayout.tsx

+ 1 - 1
packages/app/src/components/SearchPage/SearchPageLayout.tsx

@@ -25,7 +25,7 @@ const SearchPageLayout: FC<Props> = (props: Props) => {
   } = props;
   } = props;
 
 
   const renderShowingPageCountInfo = () => {
   const renderShowingPageCountInfo = () => {
-    if (searchResultMeta == null || searchResultMeta.total == null || searchResultMeta.total === 0) return (<span className="ml-3">0 / 0</span>);
+    if (searchResultMeta == null || searchResultMeta.total == null || searchResultMeta.total === 0) return;
     const leftNum = pagingLimit * (activePage - 1) + 1;
     const leftNum = pagingLimit * (activePage - 1) + 1;
     const rightNum = (leftNum - 1) + searchResultMeta.results;
     const rightNum = (leftNum - 1) + searchResultMeta.results;
     return <span className="ml-3">{`${leftNum}-${rightNum}`} / {searchResultMeta.total || 0}</span>;
     return <span className="ml-3">{`${leftNum}-${rightNum}`} / {searchResultMeta.total || 0}</span>;