mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 19:45:35 +01:00
DEV :: same styles
This commit is contained in:
parent
f677224351
commit
bbf91f31db
1 changed files with 0 additions and 21 deletions
|
|
@ -1,26 +1,5 @@
|
|||
import { useEffect } from 'react';
|
||||
import SharePage from './SharePage';
|
||||
|
||||
export default function ({ params: { shareId } }) {
|
||||
useEffect(() => {
|
||||
function sendHeightToParent() {
|
||||
const height = document.body.scrollHeight;
|
||||
window.parent.postMessage({ height: height }, '*');
|
||||
}
|
||||
|
||||
sendHeightToParent();
|
||||
|
||||
// Add event listener for resize
|
||||
window.addEventListener('resize', () => {
|
||||
sendHeightToParent();
|
||||
});
|
||||
|
||||
// Cleanup function to remove event listener
|
||||
return () => {
|
||||
window.removeEventListener('resize', () => {
|
||||
sendHeightToParent();
|
||||
});
|
||||
};
|
||||
}, [])
|
||||
return <SharePage shareId={shareId[0]} />;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue