feat: v0.15.0 — ISS-002 hovering a plane or package in the side panels highlights it on the map
CI / build + unit + e2e (pull_request) Failing after 6m8s
CI / build + unit + e2e (pull_request) Failing after 6m8s
This commit is contained in:
+9
-3
@@ -1,8 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useState } from 'react';
|
||||
import LeftPane from '@/components/LeftPane';
|
||||
import RightPane from '@/components/RightPane';
|
||||
import type { HoverTarget } from '@/components/hoverTypes';
|
||||
import { useGameState } from '@/lib/useGameState';
|
||||
|
||||
const Map = dynamic(() => import('@/components/Map'), { ssr: false });
|
||||
@@ -13,12 +15,16 @@ export default function Home() {
|
||||
// lets a pane push an action endpoint's full response snapshot in immediately.
|
||||
const { state, loading, error, refresh, applySnapshot } = useGameState(1000);
|
||||
|
||||
// ISS-002 (v0.15.0): the side panels' hover target — shared here so hovering a row in
|
||||
// either pane highlights the matching plane/route/airports on the map.
|
||||
const [hovered, setHovered] = useState<HoverTarget | null>(null);
|
||||
|
||||
return (
|
||||
<div className="app-shell">
|
||||
<LeftPane state={state} loading={loading} error={error} onRefresh={refresh} />
|
||||
<LeftPane state={state} loading={loading} error={error} onRefresh={refresh} onHover={setHovered} />
|
||||
{/* v0.11.0 — the same polled snapshot drives the map's plane markers + route lines */}
|
||||
<Map state={state} />
|
||||
<RightPane state={state} loading={loading} applySnapshot={applySnapshot} />
|
||||
<Map state={state} hovered={hovered} />
|
||||
<RightPane state={state} loading={loading} applySnapshot={applySnapshot} onHover={setHovered} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user