Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1030x 1030x 8x 10x 1020x | import type { PropsWithChildren } from "react";
import { useFlowsheetRevisionPreview } from "@/hooks/flowsheetRevisionPreview";
import FlowsheetCanvasLoadingOverlay from "../Canvas/FlowsheetCanvasLoadingOverlay";
/** Withhold state-owned readers until deep-link revision metadata is valid. */
export function FlowsheetRevisionPreviewGate({ children }: PropsWithChildren) {
const { isPreview, isLoading } = useFlowsheetRevisionPreview();
if (isPreview && isLoading) {
return (
<div className="relative flex-1 overflow-hidden">
<FlowsheetCanvasLoadingOverlay />
</div>
);
}
return children;
}
|