Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion client/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function Navbar() {
};

return(
<nav className="bg-gray-700 list-none">
<nav className="bg-gray-700 list-none relative z-20">
<div className="flex justify-between max-md:hidden">
<div className="flex">
{[items.home, items.new, items.flights, items.statistics]}
Expand Down
15 changes: 11 additions & 4 deletions client/components/WorldMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,17 @@ export default function WorldMap() {
}, []);

return (
<>
<ComposableMap width={1000} height={470}>
<div className="w-full h-full">
<ComposableMap
width={800}
height={400}
style={{ width: '100%', height: '100%' }}
projectionConfig={{
scale: 147,
center: [0, 0]
}}
>
<ZoomableGroup maxZoom={10}
translateExtent={[[0, 0], [1000, 470]]}
zoom={initialZoom}
center={center}
onMove={({zoom: newZoom}) => {
Expand All @@ -153,7 +160,7 @@ export default function WorldMap() {

</ZoomableGroup>
</ComposableMap>
</>
</div>
);
}

Expand Down
14 changes: 9 additions & 5 deletions client/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ import WorldMap from '../components/WorldMap';

export default function Home() {
return (
<>
<ShortStats />

<div className="md:w-4/5 md:m-auto">
<div className="relative -m-4">
{/* Map takes full viewport behind other elements */}
<div className="fixed inset-0 top-[56px] z-0">
<WorldMap />
</div>
</>

{/* Stats overlay on top of map */}
<div className="relative z-10 p-4">
<ShortStats />
</div>
</div>
);
}