Skip to content

Commit

Permalink
Merge pull request #287 from Vizzuality/SKY30-422-layer-preview-data
Browse files Browse the repository at this point in the history
[SKY30-422]Hide layer preview data from details columns
  • Loading branch information
SARodrigues authored Aug 9, 2024
2 parents 1850a1d + c132425 commit 4e2322c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
// },
};
};

Expand All @@ -157,7 +158,7 @@ const NationalHighseasTable: FCWithMessages = () => {

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
return <Table columns={columns} data={tableData} columnSeparators={['map']} />;
return <Table columns={columns} data={tableData} />;
};

NationalHighseasTable.messages = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className="relative -mr-0.5 h-[calc(100%+4px)] w-12 border-l border-r border-t border-b border-black">
<LayerPreview
{...{
wdpaId,
bounds,
dataSource,
}}
/>
</div>
);
},
},
// return (
// <div className="relative -mr-0.5 h-[calc(100%+4px)] w-12 border-l border-r border-t border-b border-black">
// <LayerPreview
// {...{
// wdpaId,
// bounds,
// dataSource,
// }}
// />
// </div>
// );
// },
// },
{
accessorKey: 'coverage',
header: ({ column }) => (
Expand Down

0 comments on commit 4e2322c

Please sign in to comment.