import { useCallback } from "react";
import { useLift } from "./LiftContext";
import classes from "./LiftLayer.module.css";

export function LiftLayer() {
  const { setPortalContainer } = useLift();

  const refCallback = useCallback(
    (node: HTMLDivElement | null) => {
      setPortalContainer(node);
    },
    [setPortalContainer],
  );

  return <div ref={refCallback} className={classes.liftLayer} />;
}
