diff --git a/src/pages/search.tsx b/src/pages/search.tsx index 47d6b5e..e03d02f 100644 --- a/src/pages/search.tsx +++ b/src/pages/search.tsx @@ -16,7 +16,7 @@ import { ReactNode, useEffect, useRef, useState } from 'react' import { SearchLayout } from '@/layouts/SearchLayout' import { RelatedArticles } from '@/components/RelatedArticles' import { RelatedContent } from '@/components/RelatedContent' -import { useSearchBarContext } from '@/context/searchbar.context' +import { Section } from '@/components/Section/Section' interface SearchPageProps { articles: SearchResultItem[] @@ -72,10 +72,16 @@ export default function SearchPage({ return (
- {articles.data?.length && } - - {/* TODO: used initialBlocks instead of blocks.data temporarily to render data */} - {initialBlocks?.length && } + {articles.data?.length ? ( + + ) : ( +
+ )} + {blocks.data?.length ? ( + + ) : ( +
+ )}
) }