Skip to content

Commit

Permalink
CORE-4887: hide map temporary (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekachxaidze98 authored Apr 9, 2024
1 parent 2a8fe84 commit 7a1b892
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions templates/data-providers/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ import AddDataProviderForm from './form'

import { formatNumber } from 'utils/format-number'
import Search from 'modules/search-layout'
import Map from 'modules/map'

const filterAndMapDataProviders = (dataProviders) =>
dataProviders
.filter(
({ name, dataProviderLocation }) =>
dataProviderLocation?.latitude != null &&
dataProviderLocation?.longitude != null &&
name
)
.map(({ id, name, dataProviderLocation }) => ({
name,
href: `/data-providers/${id}`,
latitude: dataProviderLocation?.latitude,
longitude: dataProviderLocation?.longitude,
}))
// REMOVE TEMP until data is correct

// const filterAndMapDataProviders = (dataProviders) =>
// dataProviders
// .filter(
// ({ name, dataProviderLocation }) =>
// dataProviderLocation?.latitude != null &&
// dataProviderLocation?.longitude != null &&
// name
// )
// .map(({ id, name, dataProviderLocation }) => ({
// name,
// href: `/data-providers/${id}`,
// latitude: dataProviderLocation?.latitude,
// longitude: dataProviderLocation?.longitude,
// }))

const getCountryName = (code) => {
const countryName = countries[String(code).toUpperCase()]
Expand Down Expand Up @@ -174,13 +175,16 @@ const DataProvidersSearchTemplate = React.memo(
</div>
</SearchResults>
<Search.Sidebar>
{results.length > 0 && (
<Map
className={styles.map}
// We have too long load map with full list data-providers
locations={filterAndMapDataProviders(results.slice(0, 200))}
/>
)}
{/* // REMOVE TEMP until data is correct */}

{/* {results.length > 0 && ( */}
{/* <Map */}
{/* className={styles.map} */}
{/* // We have too long load map with full list data-providers */}
{/* eslint-disable-next-line max-len */}
{/* locations={filterAndMapDataProviders(results.slice(0, 200))} */}
{/* /> */}
{/* )} */}
<p>
We aggregate research papers from data providers all over the world
including institutional and subject repositories and journal
Expand Down

0 comments on commit 7a1b892

Please sign in to comment.