Viewing File: /home/ubuntu/vedadeals-frontend-base/node_modules/@restart/ui/cjs/NoopTransition.js
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _react = require("react");
function NoopTransition({
children,
in: inProp,
mountOnEnter,
unmountOnExit
}) {
const hasEnteredRef = (0, _react.useRef)(inProp);
(0, _react.useEffect)(() => {
if (inProp) hasEnteredRef.current = true;
}, [inProp]);
if (inProp) return children; // not in
//
// if (!mountOnEnter && !unmountOnExit) {
// return children;
// }
if (unmountOnExit) {
return null;
}
if (!hasEnteredRef.current && mountOnEnter) {
return null;
}
return children;
}
var _default = NoopTransition;
exports.default = _default;
Back to Directory
File Manager