diff --git a/src/Popup/components/QueryResult.tsx b/src/Popup/components/QueryResult.tsx index d6ae5eb..71067b3 100644 --- a/src/Popup/components/QueryResult.tsx +++ b/src/Popup/components/QueryResult.tsx @@ -28,46 +28,22 @@ const QueryResult: FunctionComponent = ({ searchResult, downloadPDF, isSe const showMore = morePressed || searchResult.length <= maxResults - const resultType: Law.Type = searchResult[0]?.type - if(resultType === `case-citation` || resultType === `case-name`){ - return ( -
- { - (searchResult as Law.Case[]) - .slice(0, showMore ? undefined : maxResults) - .map((result) => ( - - )) - } - { showMore ? null : } -
- ) - } else if (resultType === `legislation`){ - return ( -
- { - (searchResult as Law.Legislation[]) - .slice(0, showMore ? undefined: maxResults) - .map((legislation) => { - const { provisionType, provisionNumber, statute } = legislation - return ( - - ) - }) - } - { showMore ? null : } -
- ) - } - return null + return ( +
+ { + (searchResult as Law.Case[]) + .slice(0, showMore ? undefined : maxResults) + .map((result) => ( + + )) + } + { showMore ? null : } +
+ ) } export default QueryResult \ No newline at end of file