Просмотр исходного кода

adjusted code after master merged

Mao 4 лет назад
Родитель
Сommit
dc9f5f07f3

+ 2 - 2
packages/app/src/components/SearchPage.jsx

@@ -30,7 +30,7 @@ class SearchPage extends React.Component {
       searchedKeyword: '',
       searchedPages: [],
       searchResultMeta: {},
-      focusedPage: {},
+      focusedPage: null,
       selectedPages: new Set(),
       searchResultCount: 0,
       activePage: 1,
@@ -163,7 +163,7 @@ class SearchPage extends React.Component {
           searchedPages: [],
           searchResultMeta: {},
           searchResultCount: 0,
-          focusedPage: {},
+          focusedPage: null,
           activePage: 1,
         });
       }

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

@@ -7,7 +7,7 @@ import SearchResultContentSubNavigation from './SearchResultContentSubNavigation
 type Props ={
   appContainer: AppContainer,
   searchingKeyword:string,
-  focusedPage : any,
+  focusedPage : null | any,
 }
 const SearchResultContent: FC<Props> = (props: Props) => {
   const page = props.focusedPage;

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

@@ -27,7 +27,7 @@ const PageReactionButtons : React.FC<PageReactionButtonsProps> = (props: PageRea
     const f = async() => {
       const {
         data: { likerIds, sumOfLikers, isLiked },
-      } = await apiv3Get('/page/info', { _id: pageId });
+      } = await apiv3Get('/page/info', { pageId });
 
       setSumOfLikers(sumOfLikers);
       setLikers(likerIds);