Skip to content

Commit

Permalink
widgets deck removed from dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mluena committed Apr 15, 2024
1 parent e95e98c commit 066bc7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/containers/widgets/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const widgets_prod = [
name: 'Customize Widgets Deck',
slug: 'widgets_deck_tool',
locationType: ['wdpa', 'country', 'worldwide'],

categoryIds: [
'distribution_and_change',
'ecosystem_services',
Expand All @@ -228,7 +229,7 @@ const widgets_prod = [
},
] satisfies WidgetTypes[];

const widgets =
export const widgets =
process.env.NEXT_PUBLIC_VERCEL_ENV === 'development'
? [...widgets_dev, ...widgets_prod]
: widgets_prod;
Expand Down
4 changes: 3 additions & 1 deletion src/containers/widgets/widgets-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { FaCheck } from 'react-icons/fa';
import { useRecoilState } from 'recoil';

import { LAYERS } from 'containers/layers/constants';
import widgets from 'containers/widgets/constants';
import { widgets as rawWidgets } from 'containers/widgets/constants';
import { useWidgetsIdsByLocation } from 'containers/widgets/hooks';
import { useWidgetsIdsByCategory } from 'containers/widgets/hooks';

Expand All @@ -26,6 +26,8 @@ const WidgetsMenu: FC = () => {
const [categorySelected, setCategory] = useRecoilState(activeCategoryAtom);
const [activeLayers, setActiveLayers] = useRecoilState(activeLayersAtom);
const [activeWidgets, setActiveWidgets] = useRecoilState(activeWidgetsAtom);
const widgets = rawWidgets.filter(({ slug }) => slug !== 'widgets_deck_tool');

const activeLayersIds = activeLayers.map((layer) => layer.id);
const widgetsIds = widgets.map((widget) => widget.slug);

Expand Down

0 comments on commit 066bc7f

Please sign in to comment.