|
|
@@ -1,10 +1,49 @@
|
|
|
-import React, { useEffect, useState } from 'react';
|
|
|
+import React, { FC } from 'react';
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
import RevisionLoader from '../Page/RevisionLoader';
|
|
|
import AppContainer from '~/client/services/AppContainer';
|
|
|
|
|
|
-const SearchResultContent = (props) => {
|
|
|
+type page = {
|
|
|
+ status: string,
|
|
|
+ grant: number,
|
|
|
+ grantedUsers: string[],
|
|
|
+ liker: string[],
|
|
|
+ seenUsers: string[],
|
|
|
+ commentCount: number,
|
|
|
+ _id: string,
|
|
|
+ createdAt: string,
|
|
|
+ updatedAt: string,
|
|
|
+ path: string,
|
|
|
+ creator: string,
|
|
|
+ lastUpdateUser: {
|
|
|
+ isGravatarEnabled: boolean,
|
|
|
+ isEmailPublished: boolean,
|
|
|
+ lang: string,
|
|
|
+ status: number,
|
|
|
+ admin: boolean,
|
|
|
+ isInvitationEmailSended: boolean,
|
|
|
+ _id: string,
|
|
|
+ createdAt: string,
|
|
|
+ name: string,
|
|
|
+ username: string,
|
|
|
+ email: string,
|
|
|
+ imageUrlCached: string,
|
|
|
+ lastLoginAt: string,
|
|
|
+ },
|
|
|
+ redirecTo: string,
|
|
|
+ grantedGroup: string[],
|
|
|
+ _v : string,
|
|
|
+ revision: string,
|
|
|
+ id: string
|
|
|
+}
|
|
|
+
|
|
|
+type Props ={
|
|
|
+ appContainer: AppContainer,
|
|
|
+ searchingKeyword:string,
|
|
|
+ selectedPage : page,
|
|
|
+}
|
|
|
+const SearchResultContent: FC<Props> = (props: Props) => {
|
|
|
const renderPage = (page) => {
|
|
|
const growiRenderer = props.appContainer.getRenderer('searchresult');
|
|
|
let showTags = false;
|
|
|
@@ -41,7 +80,7 @@ const SearchResultContent = (props) => {
|
|
|
SearchResultContent.propTypes = {
|
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
searchingKeyword: PropTypes.string.isRequired,
|
|
|
- selectedPage: PropTypes.object.isRequired,
|
|
|
+ // selectedPage: PropTypes.object.isRequired, // fix this
|
|
|
};
|
|
|
|
|
|
export default SearchResultContent;
|