fix: prevent grid children from overflowing on mobile
Add [&>*]:min-w-0 to lg:grid-cols-2 grids so widget cards respect the grid track width instead of expanding to content size.
This commit is contained in:
@@ -123,7 +123,7 @@ export default function BehaviorPage() {
|
|||||||
<FrustrationSummaryCards data={summary} loading={loading} />
|
<FrustrationSummaryCards data={summary} loading={loading} />
|
||||||
|
|
||||||
{/* Rage clicks + Dead clicks side by side */}
|
{/* Rage clicks + Dead clicks side by side */}
|
||||||
<div className="grid gap-6 lg:grid-cols-2 mb-8">
|
<div className="grid gap-6 lg:grid-cols-2 mb-8 [&>*]:min-w-0">
|
||||||
<FrustrationTable
|
<FrustrationTable
|
||||||
title="Rage Clicks"
|
title="Rage Clicks"
|
||||||
description="Elements users clicked repeatedly in frustration"
|
description="Elements users clicked repeatedly in frustration"
|
||||||
@@ -150,7 +150,7 @@ export default function BehaviorPage() {
|
|||||||
|
|
||||||
{/* Scroll depth + Frustration trend — hide when data failed to load */}
|
{/* Scroll depth + Frustration trend — hide when data failed to load */}
|
||||||
{!behaviorError && (
|
{!behaviorError && (
|
||||||
<div className="grid gap-6 lg:grid-cols-2 mb-8">
|
<div className="grid gap-6 lg:grid-cols-2 mb-8 [&>*]:min-w-0">
|
||||||
<ScrollDepth
|
<ScrollDepth
|
||||||
goalCounts={dashboard?.goal_counts ?? []}
|
goalCounts={dashboard?.goal_counts ?? []}
|
||||||
totalPageviews={dashboard?.stats?.pageviews ?? 0}
|
totalPageviews={dashboard?.stats?.pageviews ?? 0}
|
||||||
|
|||||||
@@ -554,7 +554,7 @@ export default function SiteDashboardPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-6 lg:grid-cols-2 mb-8">
|
<div className="grid gap-6 lg:grid-cols-2 mb-8 [&>*]:min-w-0">
|
||||||
<ContentStats
|
<ContentStats
|
||||||
topPages={dashboard?.top_pages ?? []}
|
topPages={dashboard?.top_pages ?? []}
|
||||||
entryPages={dashboard?.entry_pages ?? []}
|
entryPages={dashboard?.entry_pages ?? []}
|
||||||
@@ -574,7 +574,7 @@ export default function SiteDashboardPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-6 lg:grid-cols-2 mb-8">
|
<div className="grid gap-6 lg:grid-cols-2 mb-8 [&>*]:min-w-0">
|
||||||
<Locations
|
<Locations
|
||||||
countries={dashboard?.countries ?? []}
|
countries={dashboard?.countries ?? []}
|
||||||
cities={dashboard?.cities ?? []}
|
cities={dashboard?.cities ?? []}
|
||||||
@@ -597,11 +597,11 @@ export default function SiteDashboardPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-6 lg:grid-cols-2 mb-8">
|
<div className="grid gap-6 lg:grid-cols-2 mb-8 [&>*]:min-w-0">
|
||||||
<Campaigns siteId={siteId} dateRange={dateRange} filters={filtersParam || undefined} onFilter={handleAddFilter} />
|
<Campaigns siteId={siteId} dateRange={dateRange} filters={filtersParam || undefined} onFilter={handleAddFilter} />
|
||||||
<PeakHours siteId={siteId} dateRange={dateRange} />
|
<PeakHours siteId={siteId} dateRange={dateRange} />
|
||||||
</div>
|
</div>
|
||||||
<div className="grid gap-6 lg:grid-cols-2 mb-8">
|
<div className="grid gap-6 lg:grid-cols-2 mb-8 [&>*]:min-w-0">
|
||||||
<SearchPerformance siteId={siteId} dateRange={dateRange} />
|
<SearchPerformance siteId={siteId} dateRange={dateRange} />
|
||||||
<GoalStats
|
<GoalStats
|
||||||
goalCounts={(dashboard?.goal_counts ?? []).filter(g => !/^scroll_\d+$/.test(g.event_name))}
|
goalCounts={(dashboard?.goal_counts ?? []).filter(g => !/^scroll_\d+$/.test(g.event_name))}
|
||||||
|
|||||||
Reference in New Issue
Block a user