Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion src/components/vis/shipments-on-globe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Props = {
}

function buildGlobeVisData(lineItems: LineItem[]) {
const arcsData = lineItems
let arcsData = lineItems
.map((node) => {
if (node?.shipment?.origin === node?.shipment?.destination) {
return null
Expand All @@ -44,6 +44,51 @@ function buildGlobeVisData(lineItems: LineItem[]) {
.filter((node) => {
return node !== null
})
const extraOrigin: string[] = [
'USA',
'USA',
'USA',
'USA',
'USA',
'UKR',
'UKR',
'ESP',
'LTU',
'NLD',
'USA',
]
const extraDest: string[] = [
'UKR',
'MDA',
'POL',
'ROU',
'USA',
'GRC',
'FRA',
'POL',
'ROU',
'LBN',
'GRC',
]
const extraData = extraOrigin
.map((origin: string, index: number) => {
let originCoords = getCoordsAlpha3(origin)
let destCoords = getCoordsAlpha3(extraDest[index] || '')
if (!originCoords || !destCoords) {
return null
}
return {
startLat: originCoords?.lat,
startLng: originCoords?.lon,
endLat: destCoords?.lat,
endLng: destCoords?.lon,
color: ['blue', 'rgb(8, 43, 118)'],
}
})
.filter((node) => {
return node !== null
})
extraData.forEach((data) => arcsData.push(data))
return arcsData
}

Expand Down