Skip to content

Commit

Permalink
on close removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mluena committed May 23, 2024
1 parent 7199314 commit e68b6d0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/map/controls/basemap-settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const BasemapSettings = ({ className }: { className?: string }) => {
<BasemapsContextualMapSettings />
</Helper>
</div>
<DialogClose onClose={close} />
<DialogClose />
</DialogContent>
</Dialog>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/controls/share/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const Share = ({
</div>
</div>
</div>
<DialogClose onClose={close} />
<DialogClose />
</DialogContent>
</Dialog>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/datasets/biomass/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const widgetSlug = 'aboveground_biomass';
const COLORS = ['#EAF19D', '#B8E98E', '#1B97C1', '#1C52A3', '#13267F'];

const getColorKeys = (data: Data[] = []) =>
data.reduce((acc, d, i) => {
data?.reduce((acc, d, i) => {
return {
...acc,
[d.indicator]: COLORS[i],
Expand Down
2 changes: 1 addition & 1 deletion src/containers/datasets/fisheries/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { DataResponse, Data } from './types';
const COLORS = ['#F3E79B', '#FAC484', '#F0746E', '#B9257A', '#701A64'];

const getColorKeys = (data) =>
data.reduce(
data?.reduce(
(acc, d, index) => ({
...acc,
[d]: COLORS[index],
Expand Down
4 changes: 2 additions & 2 deletions src/containers/datasets/height/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const getData = (data: Data[], unit, COLORS_BY_INDICATOR: ColorKeysTypes) => {
const barsValues = data?.map(({ value }) => value);
const total = barsValues.reduce((previous, current) => current + previous);
return [
data.reduce((acc, d) => {
data?.reduce((acc, d) => {
const percentage = (d.value / total) * 100;
return {
...acc,
Expand All @@ -58,7 +58,7 @@ const getData = (data: Data[], unit, COLORS_BY_INDICATOR: ColorKeysTypes) => {
};

const getBars = (data: Data[], COLORS_BY_INDICATOR: ColorKeysTypes) =>
data.reduce(
data?.reduce(
(acc, d) => ({
...acc,
[`${d.indicator} m`]: {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/datasets/iucn-ecoregion/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type DataResponse = {
};

const getColorKeys = (data: Data[]) =>
data.reduce(
data?.reduce(
(acc, d) => ({
...acc,
[d.category]: COLORS[d.category],
Expand Down
2 changes: 1 addition & 1 deletion src/store/widgets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ContextualBasemapsId, WidgetSlugType } from 'types/widget';
// by default we want to show all widgets in the distribution and change category
const defaultCategory: Category = 'distribution_and_change';
const defaultWidgets = widgets
.filter((widget) => widget.categoryIds.includes(defaultCategory))
.filter((widget) => widget.categoryIds?.includes(defaultCategory))
.map((widget) => widget.slug) satisfies WidgetSlugType[];

export const activeWidgetsAtom = atom<(WidgetSlugType | ContextualBasemapsId | 'custom-area')[]>({
Expand Down

0 comments on commit e68b6d0

Please sign in to comment.