Skip to content

Commit 168f620

Browse files
committed
Fixed @macrostrat/data-components
1 parent 4c1393f commit 168f620

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

packages/data-components/src/location-info/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
metersToFeet,
55
normalizeLng,
66
} from "@macrostrat/mapbox-utils";
7-
import { formatValue } from "./utils";
87
import type { LngLatLike } from "mapbox-gl";
98

109
export function ValueWithUnit(props) {
@@ -16,6 +15,10 @@ export function ValueWithUnit(props) {
1615
]);
1716
}
1817

18+
function formatValue(val: number, precision: number = 0): string {
19+
return Number(val).toFixed(precision);
20+
}
21+
1922
export function DegreeCoord(props) {
2023
const { value, labels, precision = 3, format = formatValue } = props;
2124
const direction = value < 0 ? labels[1] : labels[0];

packages/data-components/src/location-info/utils.ts

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

0 commit comments

Comments
 (0)