From c132425c2526700581f583abbb8451b1b6add640 Mon Sep 17 00:00:00 2001 From: Simao Rodrigues Date: Thu, 8 Aug 2024 13:49:10 +0100 Subject: [PATCH] Hide layer preview data from details columns We want to retain the code in order to be able to revisit this --- .../tables/national-highseas/index.tsx | 13 ++++--- .../tables/national-highseas/useColumns.tsx | 37 ++++++++++--------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx index aec398ea..26816be2 100644 --- a/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx +++ b/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx @@ -128,11 +128,12 @@ const NationalHighseasTable: FCWithMessages = () => { area: mpa?.area, dataSource: dataSource?.slug, iucnCategory: iucnCategory?.slug, - map: { - wdpaId: mpa?.wdpaid, - bounds: mpa?.bbox, - dataSource: dataSource?.slug, - }, + // ? LayerPreview: We're not displaying the layer preview at this moment, but we want to preserve the code + // map: { + // wdpaId: mpa?.wdpaid, + // bounds: mpa?.bbox, + // dataSource: dataSource?.slug, + // }, }; }; @@ -157,7 +158,7 @@ const NationalHighseasTable: FCWithMessages = () => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - return ; + return
; }; NationalHighseasTable.messages = [ diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx index 5d8c46e7..acaf263b 100644 --- a/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx +++ b/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx @@ -71,25 +71,26 @@ const useColumns = ({ filters, onFiltersChange }: UseColumnsProps) => { ); }, }, - { - accessorKey: 'map', - header: null, - cell: ({ row }) => { - const { bounds, wdpaId, dataSource } = row.original?.map || {}; + // ? LayerPreview: We're not displaying the layer preview at this moment, but we want to preserve the code + // { + // accessorKey: 'map', + // header: null, + // cell: ({ row }) => { + // const { bounds, wdpaId, dataSource } = row.original?.map || {}; - return ( -
- -
- ); - }, - }, + // return ( + //
+ // + //
+ // ); + // }, + // }, { accessorKey: 'coverage', header: ({ column }) => (