Add header prop to control visibility of the header component

This commit is contained in:
2025-10-05 16:39:19 +02:00
parent 7efa724631
commit 634c72be2d
2 changed files with 23 additions and 19 deletions

View File

@@ -33,6 +33,7 @@ interface RegionMapProps {
focusSystem?: string; focusSystem?: string;
isCompact?: boolean; isCompact?: boolean;
isWormholeRegion?: boolean; isWormholeRegion?: boolean;
header?: boolean;
} }
interface ContextMenuState { interface ContextMenuState {
@@ -93,7 +94,7 @@ const ensureUniversePositions = async () => {
} }
}; };
export const RegionMap = ({ regionName, focusSystem, isCompact = false, isWormholeRegion = false }: RegionMapProps) => { export const RegionMap = ({ regionName, focusSystem, isCompact = false, isWormholeRegion = false, header = true }: RegionMapProps) => {
const navigate = useNavigate(); const navigate = useNavigate();
const [viewBox, setViewBox] = useState({ x: 0, y: 0, width: 1200, height: 800 }); const [viewBox, setViewBox] = useState({ x: 0, y: 0, width: 1200, height: 800 });
const [isPanning, setIsPanning] = useState(false); const [isPanning, setIsPanning] = useState(false);
@@ -1021,6 +1022,7 @@ export const RegionMap = ({ regionName, focusSystem, isCompact = false, isWormho
return ( return (
<div className="w-full h-full bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 relative"> <div className="w-full h-full bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 relative">
{header && (
<Header <Header
title={`Region: ${regionName}`} title={`Region: ${regionName}`}
breadcrumbs={[ breadcrumbs={[
@@ -1028,6 +1030,7 @@ export const RegionMap = ({ regionName, focusSystem, isCompact = false, isWormho
{ label: regionName } { label: regionName }
]} ]}
/> />
)}
<svg <svg
ref={svgRef} ref={svgRef}
width="100%" width="100%"

View File

@@ -281,6 +281,7 @@ export const SystemView = () => {
regionName={region} regionName={region}
focusSystem={system} focusSystem={system}
isCompact={true} isCompact={true}
header={false}
/> />
</div> </div>
</div> </div>