Skip to content

Commit

Permalink
use 'satisfies'
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Oct 7, 2024
1 parent a200c00 commit 9a7e521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/CodeViewer/CodeViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ const CodeViewer: React.FC<CodeViewerProps> = ({
};

// Merge custom options with default Monaco options
const mergedOptions: monaco.editor.IStandaloneEditorConstructionOptions = {
const mergedOptions = {
fontSize: 15,
minimap: { enabled: false },
lineNumbers: 'off',
stopRenderingLineAfter: editorOptions?.stopRenderingLineAfter,
...editorOptions, // Allow overriding with additional options
};
} satisfies monaco.editor.IStandaloneEditorConstructionOptions;

return (
<Box height={'100%'}>
Expand Down
12 changes: 6 additions & 6 deletions src/components/LocationSearch/useNominatimAutocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export type Place = {
id: string;
label: string;
location: {
lat: string;
lng: string;
lat: number;
lng: number;
};
};

Expand Down Expand Up @@ -47,8 +47,8 @@ const useNominatimAutocomplete = (input: string) => {
id: item.place_id,
label: item.display_name,
location: {
lat: item.lat,
lng: item.lon,
lat: parseFloat(item.lat),
lng: parseFloat(item.lon),
},
}));

Expand Down Expand Up @@ -84,8 +84,8 @@ const useNominatimAutocomplete = (input: string) => {

const getPlaceLatLng = (place: Place): Coordinates => {
return {
lat: parseFloat(place.location.lat),
lng: parseFloat(place.location.lng),
lat: place.location.lat,
lng: place.location.lng,
};
};

Expand Down

0 comments on commit 9a7e521

Please sign in to comment.