mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 08:09:33 +01:00
* refactor: edition specific migration * revert: pagination from space endpoints * fix: project publish --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
18 lines
334 B
TypeScript
18 lines
334 B
TypeScript
import { useState, useEffect } from "react";
|
|
|
|
const useIsInIframe = () => {
|
|
const [isInIframe, setIsInIframe] = useState(false);
|
|
|
|
useEffect(() => {
|
|
const checkIfInIframe = () => {
|
|
setIsInIframe(window.self !== window.top);
|
|
};
|
|
|
|
checkIfInIframe();
|
|
}, []);
|
|
|
|
return isInIframe;
|
|
};
|
|
|
|
export default useIsInIframe;
|