feat: fix test
This commit is contained in:
parent
9f2d98a9ea
commit
18c13628ba
@ -49,7 +49,6 @@ const Header = () => {
|
|||||||
to={URLs.armMap.url}
|
to={URLs.armMap.url}
|
||||||
colorScheme={isActive(URLs.armMap.url) ? 'green' : 'blue'}
|
colorScheme={isActive(URLs.armMap.url) ? 'green' : 'blue'}
|
||||||
variant={isActive(URLs.armMap.url) ? 'outline' : 'ghost'}
|
variant={isActive(URLs.armMap.url) ? 'outline' : 'ghost'}
|
||||||
data-testid='master-button'
|
|
||||||
>
|
>
|
||||||
Карта заказов
|
Карта заказов
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
const getCoordinates = (location: string) => {
|
const getCoordinates = (location: string) => {
|
||||||
if (!location) return null;
|
if (!location) return {};
|
||||||
|
|
||||||
const [lat, lon] = location
|
const [lat, lon] = location
|
||||||
.split(',')
|
.split(',')
|
||||||
.map((coord) => parseFloat(coord.trim()));
|
.map((coord) => parseFloat(coord.trim()));
|
||||||
|
|
||||||
if (isNaN(lat) || isNaN(lon)) return null;
|
if (isNaN(lat) || isNaN(lon)) return {};
|
||||||
|
|
||||||
return { lat, lon };
|
return { lat, lon };
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user