Make xy numbers instead of strings
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
import React, { useState, useRef, useCallback, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { MapNode } from './MapNode';
|
||||
@@ -10,8 +9,8 @@ import { getSecurityColor } from '../utils/securityColors';
|
||||
|
||||
interface SolarSystem {
|
||||
solarSystemName: string;
|
||||
x: string;
|
||||
y: string;
|
||||
x: number;
|
||||
y: number;
|
||||
security: number;
|
||||
connectedSystems: string[];
|
||||
}
|
||||
@@ -48,8 +47,8 @@ export const RegionMap: React.FC<{ regionName: string }> = ({ regionName }) => {
|
||||
const positions: Record<string, Position> = {};
|
||||
systems.forEach(system => {
|
||||
positions[system.solarSystemName] = {
|
||||
x: parseInt(system.x),
|
||||
y: parseInt(system.y)
|
||||
x: system.x,
|
||||
y: system.y
|
||||
};
|
||||
});
|
||||
setNodePositions(positions);
|
||||
|
||||
Reference in New Issue
Block a user