Skip to content

Commit

Permalink
feat: refactor global map and aside view for alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Apr 11, 2024
1 parent 3ec5e7a commit 63b2769
Show file tree
Hide file tree
Showing 30 changed files with 417 additions and 998 deletions.
3 changes: 1 addition & 2 deletions src/components/GlobalFooter/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
display: flex;
flex-direction: column;
gap: var(--go-ui-spacing-sm);

.footer-link {
text-decoration: none;
color: var(--go-ui-color-white);
Expand Down Expand Up @@ -50,4 +49,4 @@
@media print {
display: none;
}
}
}
3 changes: 1 addition & 2 deletions src/utils/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const defaultNavControlPosition: ControlPosition = 'top-right';

export const defaultMapOptions: Omit<mapboxgl.MapboxOptions, 'style' | 'container'> = {
logoPosition: 'bottom-left' as const,
zoom: 1.5,
zoom: 1,
minZoom: 1,
maxZoom: 18,
scrollZoom: false,
Expand All @@ -26,7 +26,6 @@ export const defaultMapOptions: Omit<mapboxgl.MapboxOptions, 'style' | 'containe
renderWorldCopies: true,
attributionControl: false,
preserveDrawingBuffer: true,
// interactive: false,
};

const DEFAULT_CIRCLE_SIZE = 'medium';
Expand Down
41 changes: 41 additions & 0 deletions src/utils/selectors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export function booleanValueSelector(option: { value: boolean }) {
return option.value;
}
export function numericValueSelector(option: { value: number }) {
return option.value;
}
export function stringValueSelector(option: { value: string }) {
return option.value;
}

export function stringLabelSelector(option: { label: string }) {
return option.label;
}

export function numericIdSelector(option: { id: number }) {
return option.id;
}

export function stringIdSelector(option: { id: string }) {
return option.id;
}

export function stringNameSelector(option: { name: string }) {
return option.name;
}

export function stringTitleSelector(option: { title: string }) {
return option.title;
}

export function stringKeySelector(option: { key: string }) {
return option.key;
}

export function numericKeySelector(option: { key: number }) {
return option.key;
}

export function numericCountSelector(option: { count: number }) {
return option.count;
}
37 changes: 0 additions & 37 deletions src/views/Home/AlertMap/AlertListItem/AlertDetail/index.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/views/Home/AlertMap/AlertListItem/i18n.json

This file was deleted.

175 changes: 0 additions & 175 deletions src/views/Home/AlertMap/AlertListItem/index.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/views/Home/AlertMap/AlertListItem/styles.module.css

This file was deleted.

6 changes: 0 additions & 6 deletions src/views/Home/AlertMap/CountryListItem/i18n.json

This file was deleted.

51 changes: 0 additions & 51 deletions src/views/Home/AlertMap/CountryListItem/index.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions src/views/Home/AlertMap/CountryListItem/styles.module.css

This file was deleted.

Loading

0 comments on commit 63b2769

Please sign in to comment.