diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-24 16:44:29 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-24 16:44:29 +0200 |
| commit | 1e982fb02a9967e0efdc76c93a44798a9f2dcb43 (patch) | |
| tree | b9a526ade81feee20cf18404e2a7053ccff6c999 /src/pages | |
| parent | c347190a4307c172d15dac156da86567098035f6 (diff) | |
chore: add a search form when posts list prints no results
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/blog/index.tsx | 1 | ||||
| -rw-r--r-- | src/pages/blog/page/[number].tsx | 1 | ||||
| -rw-r--r-- | src/pages/recherche/index.tsx | 1 | ||||
| -rw-r--r-- | src/pages/sujet/[slug].tsx | 5 | ||||
| -rw-r--r-- | src/pages/thematique/[slug].tsx | 5 |
5 files changed, 9 insertions, 4 deletions
diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx index 3956308..3f7eefd 100644 --- a/src/pages/blog/index.tsx +++ b/src/pages/blog/index.tsx @@ -177,6 +177,7 @@ const BlogPage: NextPageWithLayout<BlogPageProps> = ({ isLoading={isLoadingMore || isLoadingInitialData} loadMore={loadMore} posts={getPostsList(data)} + searchPage="/recherche/" showLoadMoreBtn={hasNextPage} total={totalArticles} /> diff --git a/src/pages/blog/page/[number].tsx b/src/pages/blog/page/[number].tsx index b5efd27..1e1240a 100644 --- a/src/pages/blog/page/[number].tsx +++ b/src/pages/blog/page/[number].tsx @@ -170,6 +170,7 @@ const BlogPage: NextPageWithLayout<BlogPageProps> = ({ byYear={true} pageNumber={pageNumber} posts={getPostsList([articles])} + searchPage="/recherche/" total={totalArticles} /> </PageLayout> diff --git a/src/pages/recherche/index.tsx b/src/pages/recherche/index.tsx index ffdbf44..dbbec55 100644 --- a/src/pages/recherche/index.tsx +++ b/src/pages/recherche/index.tsx @@ -189,6 +189,7 @@ const SearchPage: NextPageWithLayout<SearchPageProps> = ({ isLoading={isLoadingMore || isLoadingInitialData} loadMore={loadMore} posts={getPostsList(data)} + searchPage="/recherche/" showLoadMoreBtn={hasNextPage} total={totalArticles || 0} /> diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx index 5c86720..48924e5 100644 --- a/src/pages/sujet/[slug].tsx +++ b/src/pages/sujet/[slug].tsx @@ -167,10 +167,11 @@ const TopicPage: NextPageWithLayout<TopicPageProps> = ({ </Heading> <PostsList baseUrl="/sujet/page/" + byYear={true} posts={getPostsWithUrl(articles)} - total={articles.length} + searchPage="/recherche/" titleLevel={3} - byYear={true} + total={articles.length} /> </> )} diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 0519731..7aa6c1c 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -147,10 +147,11 @@ const ThematicPage: NextPageWithLayout<ThematicPageProps> = ({ </Heading> <PostsList baseUrl="/thematique/page/" + byYear={true} posts={getPostsWithUrl(articles)} - total={articles.length} + searchPage="/recherche/" titleLevel={3} - byYear={true} + total={articles.length} /> </> )} |
