fix(web): portal timeline overlays above stacked panels

This commit is contained in:
2026-03-30 13:18:08 +02:00
parent 58824545fc
commit e20bf64eef
5 changed files with 22 additions and 6 deletions
@@ -1,5 +1,6 @@
"use client";
import { createPortal } from "react-dom";
import type { TimelineDemandEntry } from "./TimelineContext.js";
import { formatCents, formatDateLong } from "~/lib/format.js";
import { useViewportPopover } from "~/hooks/useViewportPopover.js";
@@ -36,7 +37,7 @@ export function DemandPopover({
const totalHours = demand.hoursPerDay * days;
const budgetCents = demand.dailyCostCents * days;
return (
const popover = (
<div
ref={ref}
style={style}
@@ -171,4 +172,6 @@ export function DemandPopover({
</div>
</div>
);
return typeof document === "undefined" ? popover : createPortal(popover, document.body);
}