fix: improve graph spacing, mobile layout, and Telegram viewport

- Increase FA2 scalingRatio to 10 and decrease gravity to 0.5 for
  better node spacing (less cluttered graph)
- Use 100dvh instead of 100vh for Telegram Mini App viewport compat
- Hide legend on mobile to prevent overlay collision
- Move controls to bottom-right on mobile, bottom-center on desktop
- Make stats single-column on mobile for compact layout
This commit is contained in:
Fringg
2026-03-19 08:20:38 +03:00
parent 0f756d633d
commit 818557f57d
3 changed files with 10 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ export function ReferralNetwork() {
return (
<div
id="referral-network-container"
className="relative flex h-[calc(100vh-64px)] flex-col overflow-hidden bg-[#0a0a0f]"
className="relative flex h-[calc(100dvh-64px)] flex-col overflow-hidden bg-[#0a0a0f]"
>
{/* Top bar */}
<div className="relative z-20 flex shrink-0 items-center gap-3 border-b border-dark-700/50 bg-dark-900/90 px-4 py-3 backdrop-blur-md">
@@ -86,13 +86,13 @@ export function ReferralNetwork() {
<NetworkStats data={networkData} />
</div>
{/* Bottom-right: legend */}
<div className="absolute bottom-4 right-4 z-10">
{/* Bottom-right: legend (hidden on mobile to avoid overlap) */}
<div className="absolute bottom-4 right-4 z-10 hidden sm:block">
<NetworkLegend />
</div>
{/* Bottom-center: controls */}
<div className="absolute bottom-4 left-1/2 z-10 -translate-x-1/2">
{/* Bottom-right on mobile, bottom-center on desktop: controls */}
<div className="absolute bottom-4 right-4 z-10 sm:left-1/2 sm:right-auto sm:-translate-x-1/2">
<NetworkControls />
</div>
</>