From 60aab0c10612a5810d3761c9c82b0e8e81bb0bd9 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 | 47 ++++++++++++++------- pages/data-providers/index.jsx | 2 +- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/pages/data-providers/[data-provider-id].jsx b/pages/data-providers/[data-provider-id].jsx index 584dc075..f931ab61 100644 --- a/pages/data-providers/[data-provider-id].jsx +++ b/pages/data-providers/[data-provider-id].jsx @@ -1,5 +1,6 @@ import React, { useEffect, useRef } from 'react' import { useRouter } from 'next/router' +import Head from 'next/head' import { useSyncUrlParamsWithStore } from 'hooks/use-sync-url-params-with-store' import { convertAndValidate } from 'utils/validation' @@ -96,22 +97,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 */}