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

79940 highlighting result item's path

SULLEY\ryo-h 4 лет назад
Родитель
Сommit
f4f4ee0463

+ 2 - 1
packages/app/src/components/SearchPage/SearchResultListItem.tsx

@@ -15,6 +15,7 @@ type Props ={
     lastUpdateUser: any
     elasticSearchResult: {
       snippet: string,
+      highlightedPath: string
     }
   },
   highlightedPath: string,
@@ -60,7 +61,7 @@ const SearchResultListItem: FC<Props> = (props:Props) => {
             <small className="mb-1">
               <i className="icon-fw icon-home"></i>
               {/* eslint-disable-next-line react/no-danger */}
-              <div dangerouslySetInnerHTML={{ __html: highlightedPath }}>{pagePathElem}</div>
+              <div dangerouslySetInnerHTML={{ __html: page.elasticSearchResult.highlightedPath }}></div>
             </small>
             <div className="d-flex my-1 align-items-center">
               {/* page title */}

+ 0 - 1
packages/ui/src/components/PagePath/PagePathLabel.jsx

@@ -6,7 +6,6 @@ import { DevidedPagePath } from '@growi/core';
 export const PagePathLabel = (props) => {
 
   const dPagePath = new DevidedPagePath(props.page.path, false, true);
-  console.log(props.page.path);
 
   let classNames = [''];
   classNames = classNames.concat(props.additionalClassNames);