Skip to content

Commit

Permalink
3008: Hide the loader when first opening the search page
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandraH committed Nov 27, 2024
1 parent ce168be commit 5319528
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/src/routes/SearchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ const SearchPage = ({ city, cityCode, languageCode, pathname }: CityRouteProps):
/>
)

if (query.length === 0) {
return (
<CityContentLayout isLoading {...locationLayoutParams}>
<Helmet pageTitle={pageTitle} languageChangePaths={languageChangePaths} cityModel={city} />
{SearchBar}
</CityContentLayout>
)
}

if (loading || !results) {
return (
<CityContentLayout isLoading {...locationLayoutParams}>
Expand Down

0 comments on commit 5319528

Please sign in to comment.