From 79974a82869d6bab72b1dc62e370d7dc7aa07130 Mon Sep 17 00:00:00 2001 From: Jozef Harag <32jojo32@gmail.com> Date: Mon, 16 Nov 2020 15:27:47 +0100 Subject: [PATCH] Add meta tags --- pages/data-providers/[data-provider-id].jsx | 49 ++++++++++++++------- pages/data-providers/index.jsx | 2 +- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/pages/data-providers/[data-provider-id].jsx b/pages/data-providers/[data-provider-id].jsx index 584dc075..ed01048c 100644 --- a/pages/data-providers/[data-provider-id].jsx +++ b/pages/data-providers/[data-provider-id].jsx @@ -1,5 +1,8 @@ import React, { useEffect, useRef } from 'react' import { useRouter } from 'next/router' +import Head from 'next/head' + +import { generateMetadata } from '../../templates/data-providers/utils' import { useSyncUrlParamsWithStore } from 'hooks/use-sync-url-params-with-store' import { convertAndValidate } from 'utils/validation' @@ -96,22 +99,36 @@ const DataProviderPage = observe(({ initialState }) => { ]) return ( - { - dataProvider.params.q = q - }} - from={dataProvider.params.from} - size={dataProvider.params.size} - // TODO: Get proper value from API - total={50000} - loading={dataProvider.loading} - basePath={`/data-providers/${dataProvider.id}`} - isLoadingMore={dataProvider.isLoadingMore} - /> + <> + + + {dataProvider.params.q + ? `Search "${dataProvider.params.q}" in ${dataProvider.metadata.name}` + : `${dataProvider.metadata.name}`} + Data providers search + + + + { + dataProvider.params.q = q + }} + from={dataProvider.params.from} + size={dataProvider.params.size} + // TODO: Get proper value from API + total={50000} + loading={dataProvider.loading} + basePath={`/data-providers/${dataProvider.id}`} + isLoadingMore={dataProvider.isLoadingMore} + /> + ) }) diff --git a/pages/data-providers/index.jsx b/pages/data-providers/index.jsx index 84f53c18..13d24d14 100644 --- a/pages/data-providers/index.jsx +++ b/pages/data-providers/index.jsx @@ -82,7 +82,7 @@ const SearchPage = observe(({ initialState }) => { {query ? `${query} - ` : ''}Data providers search {/* eslint-disable react/no-danger */}