Skip to content

Commit eaa1e20

Browse files
shreeyash07frozenhelium
authored andcommitted
fix PR comments
1 parent 6030207 commit eaa1e20

File tree

30 files changed

+239
-461
lines changed

30 files changed

+239
-461
lines changed

docker-compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ services:
138138
REACT_APP_SENTRY_DSN: ${MANAGER_DASHBOARD_SENTRY_DSN}
139139
REACT_APP_SENTRY_TRACES_SAMPLE_RATE: ${MANAGER_DASHBOARD_SENTRY_TRACES_SAMPLE_RATE}
140140
REACT_APP_COMMUNITY_DASHBOARD_URL: ${MANAGER_DASHBOARD_COMMUNITY_DASHBOARD_URL}
141-
REACT_APP_IMAGE_BING_API_KEY: '${IMAGE_BING_API_KEY}'
142-
REACT_APP_IMAGE_MAPBOX_API_KEY: '${IMAGE_MAPBOX_API_KEY}'
143-
REACT_APP_IMAGE_MAXAR_PREMIUM_API_KEY: '${IMAGE_MAXAR_PREMIUM_API_KEY}'
144-
REACT_APP_IMAGE_MAXAR_STANDARD_API_KEY: '${IMAGE_MAXAR_STANDARD_API_KEY}'
141+
REACT_APP_IMAGE_BING_API_KEY: ${IMAGE_BING_API_KEY}
142+
REACT_APP_IMAGE_MAPBOX_API_KEY: ${IMAGE_MAPBOX_API_KEY}
143+
REACT_APP_IMAGE_MAXAR_PREMIUM_API_KEY: ${IMAGE_MAXAR_PREMIUM_API_KEY}
144+
REACT_APP_IMAGE_MAXAR_STANDARD_API_KEY: ${IMAGE_MAXAR_STANDARD_API_KEY}
145145
volumes:
146146
- manager-dashboard-static:/code/build/
147147
command: bash -c 'yarn build'

manager-dashboard/app/components/Card/index.tsx

Lines changed: 0 additions & 43 deletions
This file was deleted.

manager-dashboard/app/components/Card/styles.css

Lines changed: 0 additions & 24 deletions
This file was deleted.

manager-dashboard/app/components/ExpandableContainer/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
.header {
1414
flex-grow: 1;
15-
font-size: 1.2rem;
15+
font-size: var(--font-size-large);
1616
}
1717

1818
.icons {
@@ -21,7 +21,7 @@
2121
flex-shrink: 0;
2222

2323
>* {
24-
font-size: 1.2rem;
24+
font-size: var(--font-size-large);
2525
}
2626
}
2727

@@ -31,7 +31,7 @@
3131
flex-shrink: 0;
3232

3333
>* {
34-
font-size: 1.2rem;
34+
font-size: var(--font-size-large);
3535
}
3636
}
3737
}

manager-dashboard/app/components/GeoJsonFileInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ function GeoJsonFileInput<N>(props: Props<N>) {
9696
const file = newValue;
9797

9898
async function handleValidationAndChange() {
99-
const text = await readUploadedFileAsText(file);
10099
let fileAsJson;
101100
try {
101+
const text = await readUploadedFileAsText(file);
102102
if (!mountedRef.current) {
103103
return;
104104
}

manager-dashboard/app/components/GeoJsonPreview/index.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
TileLayer,
77
Coords,
88
StyleFunction,
9-
PointExpression,
109
} from 'leaflet';
1110
import { _cs } from '@togglecorp/fujs';
1211

@@ -51,16 +50,14 @@ interface Props {
5150
geoJson: GeoJSON.GeoJSON | undefined;
5251
url?: string | undefined;
5352
previewStyle?: StyleFunction;
54-
boundsPadding?: PointExpression | undefined;
5553
}
5654

5755
function GeoJsonPreview(props: Props) {
5856
const {
5957
className,
6058
geoJson,
61-
url,
59+
url = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
6260
previewStyle,
63-
boundsPadding = [0, 0],
6461
} = props;
6562

6663
const mapRef = React.useRef<Map>();
@@ -83,7 +80,7 @@ function GeoJsonPreview(props: Props) {
8380
1,
8481
);
8582

86-
const finalUrl = url || 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
83+
const finalUrl = url;
8784
const quadKeyUrl = finalUrl.indexOf('{quad_key}') !== -1;
8885
const Layer = quadKeyUrl
8986
? BingTileLayer
@@ -129,7 +126,7 @@ function GeoJsonPreview(props: Props) {
129126
const bounds = newGeoJson.getBounds();
130127

131128
if (bounds.isValid()) {
132-
map.fitBounds(bounds, { padding: boundsPadding });
129+
map.fitBounds(bounds);
133130
}
134131

135132
return () => {
@@ -142,7 +139,6 @@ function GeoJsonPreview(props: Props) {
142139
geoJson,
143140
url,
144141
previewStyle,
145-
boundsPadding,
146142
],
147143
);
148144

manager-dashboard/app/components/MarkdownEditor/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ import MarkdownPreview from '../MarkdownPreview';
66

77
import styles from './styles.css';
88

9-
interface MarkdownEditorProps<K extends string> {
10-
name: K;
9+
interface MarkdownEditorProps<NAME extends string> {
10+
name: NAME;
1111
className?: string;
1212
readOnly?: boolean;
1313
disabled?: boolean;
1414
value: string | null | undefined;
15-
onChange?:(newVal: string | undefined, name: K) => void;
15+
onChange?:(newVal: string | undefined, name: NAME) => void;
1616
}
1717

18-
export type Props<K extends string> = Omit<InputContainerProps, 'input'> & MarkdownEditorProps<K>;
18+
export type Props<NAME extends string> = Omit<InputContainerProps, 'input'> & MarkdownEditorProps<NAME>;
1919

20-
function MarkdownEditor<K extends string>(props: Props<K>) {
20+
function MarkdownEditor<NAME extends string>(props: Props<NAME>) {
2121
const {
2222
name,
2323
value,

manager-dashboard/app/components/MobilePreview/styles.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929

3030
.icons {
3131
.back-icon {
32-
font-size: 2rem;
32+
font-size: var(--font-size-super-large);
3333
}
3434
}
3535

3636
.actions {
3737
flex-shrink: 0;
3838

3939
.info-icon {
40-
font-size: 1.6rem;
40+
font-size: var(--font-size-extra-large);
4141
}
4242
}
4343
}
@@ -49,7 +49,7 @@
4949
flex-grow: 1;
5050
z-index: 0;
5151
background-color: var(--color-primary);
52-
padding: 1rem;
52+
padding: var(--spacing-medium);
5353
overflow: auto;
5454

5555
.content {
@@ -75,7 +75,7 @@
7575

7676
.icons {
7777
flex-shrink: 0;
78-
font-size: 2rem;
78+
font-size: var(--font-size-super-large);
7979
}
8080
}
8181
}

manager-dashboard/app/components/PopupButton/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Popup from '../Popup';
1111

1212
import styles from './styles.css';
1313

14-
export interface PopupButtonProps<N extends number | string | undefined> extends Omit<ButtonProps<N>, 'label'> {
14+
export interface PopupButtonProps<NAME extends number | string | undefined> extends Omit<ButtonProps<NAME>, 'label'> {
1515
popupClassName?: string;
1616
popupContentClassName?: string;
1717
label: React.ReactNode;
@@ -23,7 +23,7 @@ export interface PopupButtonProps<N extends number | string | undefined> extends
2323
defaultShown?: boolean;
2424
}
2525

26-
function PopupButton<N extends number | string | undefined>(props: PopupButtonProps<N>) {
26+
function PopupButton<NAME extends number | string | undefined>(props: PopupButtonProps<NAME>) {
2727
const {
2828
popupClassName,
2929
popupContentClassName,

manager-dashboard/app/components/Tabs/index.tsx

Lines changed: 0 additions & 135 deletions
This file was deleted.

0 commit comments

Comments
 (0)