DEV :: same styles

This commit is contained in:
badrAG 2024-04-09 18:02:53 +00:00
parent 83b6214260
commit e363f862c6

View file

@ -21,14 +21,12 @@ export default function WebsiteDetails({ websiteId }: { websiteId: string }) {
} }
const showLinks = !pathname.includes('/share/'); const showLinks = !pathname.includes('/share/');
const { view, ...params } = query; const { view, ...params } = query;
useEffect(() => { const sendHeight = () => {
// Send message to parent window with content height
const sendHeight = () => {
const height = document.body.scrollHeight; const height = document.body.scrollHeight;
window.parent.postMessage({ height: height }, "*"); window.parent.postMessage({ height: height }, "*");
}; };
useEffect(() => {
// Send content height initially and on resize // Send content height initially and on resize
sendHeight(); sendHeight();
window.addEventListener('resize', sendHeight); window.addEventListener('resize', sendHeight);