Explorar el Código

transformed comp to loose tsx comp

Mao hace 4 años
padre
commit
60504909d1

+ 1 - 34
packages/app/src/components/SearchPage/SearchControl.tsx

@@ -3,45 +3,12 @@ import PropTypes from 'prop-types';
 import SearchPageForm from './SearchPageForm';
 import AppContainer from '../../client/services/AppContainer';
 
-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 = {
   searchingKeyword: string,
   appContainer: AppContainer,
   t: (str: string) => string,
-  onSearchInvoked: (data : page[]) => boolean,
+  onSearchInvoked: (data : any[]) => boolean,
 }
 
 const SearchControl: FC <Props> = (props: Props) => {

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

@@ -4,44 +4,11 @@ import PropTypes from 'prop-types';
 import RevisionLoader from '../Page/RevisionLoader';
 import AppContainer from '../../client/services/AppContainer';
 
-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,
+  selectedPage : any,
 }
 const SearchResultContent: FC<Props> = (props: Props) => {
   // Temporaly workaround for lint error