mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
f13c190676
* fix: is in iframe validation check * chore: remove/ disable all actionable items from deploy url in case url is embeded using Iframe. * chore: remove copy issue link option if clipboard write access is not granted. --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@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;
|