fix(web): portal timeline overlays above stacked panels
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user